Thread (4 messages) 4 messages, 3 authors, 2023-06-27

Re: [PATCH] ll-merge: killing the external merge driver aborts the merge

From: Johannes Schindelin <hidden>
Date: 2023-06-27 12:02:27
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Hi,


On Fri, 23 Jun 2023, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
Elijah Newren [off-list ref] writes:
quoted
Reviewed-by: Elijah Newren <redacted>

Thanks for a quick review.
Unfortunately Windows does not seem to correctly detect the aborting
merge driver.  Does run_command() there report process death due to
signals differently, I wonder?

https://github.com/git/git/actions/runs/5360400800/jobs/9725341775#step:6:285

shows that on Windows, aborted external merge driver is not noticed
and we happily take the auto-merged result, ouch.
Hmm. I tried to verify this, but failed. With this patch:
diff --git a/git.c b/git.c
index 2f42da20f4e0..3c513e3f2cb1 100644
--- a/git.c
+++ b/git.c
@@ -330,6 +330,8 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 			setenv(GIT_ATTR_SOURCE_ENVIRONMENT, cmd, 1);
 			if (envchanged)
 				*envchanged = 1;
+		} else if (!strcmp(cmd, "--abort")) {
+			abort();
 		} else {
 			fprintf(stderr, _("unknown option: %s\n"), cmd);
 			usage(git_usage_string);
I get this:

$ ./git.exe --abort

$ echo $?
3
For that reason, I am somehow doubtful that the `abort()` is actually
called?!?

Ciao,
Johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help