From 5deee7ab4297ec2a1204ccec28549e4875dbc7ac Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 21 Mar 2026 11:17:01 +0100 Subject: [PATCH 1/3] feat(git-node): suggest abort previous session --- components/git/land.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/git/land.js b/components/git/land.js index 48cf99f8..f118f8a4 100644 --- a/components/git/land.js +++ b/components/git/land.js @@ -189,6 +189,7 @@ async function main(state, argv, cli, dir) { cli.warn( 'Failed to detect previous session. ' + 'please run `git node land --abort`'); + process.exitCode ||= 1; return; } @@ -197,8 +198,9 @@ async function main(state, argv, cli, dir) { cli.warn( 'Previous `git node land` session for ' + `${session.pullName} in progress.`); - cli.log('run `git node land --abort` before starting a new session'); - return; + const response = await cli.prompt('Do you want to abort it?', { defaultAnswer: false }); + if (!response) throw new Error('Please run `git node land --abort`'); + await session.abort(); } session = new LandingSession(cli, req, dir, argv); const metadata = await getMetadata(session.argv, argv.skipRefs, cli); From d6102fa1ae12de8b795f49050f336a4f89cb9b99 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 21 Mar 2026 11:53:08 +0100 Subject: [PATCH 2/3] fixup! feat(git-node): suggest abort previous session --- components/git/land.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/git/land.js b/components/git/land.js index f118f8a4..19ef9c7e 100644 --- a/components/git/land.js +++ b/components/git/land.js @@ -201,8 +201,8 @@ async function main(state, argv, cli, dir) { const response = await cli.prompt('Do you want to abort it?', { defaultAnswer: false }); if (!response) throw new Error('Please run `git node land --abort`'); await session.abort(); + session = new LandingSession(cli, req, dir, argv); } - session = new LandingSession(cli, req, dir, argv); const metadata = await getMetadata(session.argv, argv.skipRefs, cli); if (argv.backport) { const split = metadata.metadata.split('\n')[0]; From 5d0fc8de94288e4896d559e29aa8c6436805073f Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 24 Mar 2026 14:24:42 +0100 Subject: [PATCH 3/3] fixup! feat(git-node): suggest abort previous session --- components/git/land.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/git/land.js b/components/git/land.js index 19ef9c7e..310767b8 100644 --- a/components/git/land.js +++ b/components/git/land.js @@ -189,7 +189,7 @@ async function main(state, argv, cli, dir) { cli.warn( 'Failed to detect previous session. ' + 'please run `git node land --abort`'); - process.exitCode ||= 1; + cli.setErrorCode(1); return; }