Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-06-30 02:43:21 +0300
committerJunio C Hamano <gitster@pobox.com>2023-06-30 02:43:21 +0300
commit3ea43bbe17b9f0d8ffcad17ce602d36ea0668ab8 (patch)
tree256f0aebc98100cdf485b1c38b3dd2c74e7b8f90 /merge-ll.c
parenta1264a08a1a6e0cd7e510c899cd0ba42dcf1045d (diff)
parent34d765e736e015f5c4790db2c0a1d3ddbd4bd3e9 (diff)
Merge branch 'jc/abort-ll-merge-with-a-signal'
When the external merge driver is killed by a signal, its output should not be trusted as a resolution with conflicts that is proposed by the driver, but the code did. * jc/abort-ll-merge-with-a-signal: t6406: skip "external merge driver getting killed by a signal" test on Windows ll-merge: killing the external merge driver aborts the merge
Diffstat (limited to 'merge-ll.c')
-rw-r--r--merge-ll.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/merge-ll.c b/merge-ll.c
index 740b8c6bfd..478983309d 100644
--- a/merge-ll.c
+++ b/merge-ll.c
@@ -243,7 +243,14 @@ static enum ll_merge_result ll_ext_merge(const struct ll_merge_driver *fn,
unlink_or_warn(temp[i]);
strbuf_release(&cmd);
strbuf_release(&path_sq);
- ret = (status > 0) ? LL_MERGE_CONFLICT : status;
+
+ if (!status)
+ ret = LL_MERGE_OK;
+ else if (status <= 128)
+ ret = LL_MERGE_CONFLICT;
+ else
+ /* died due to a signal: WTERMSIG(status) + 128 */
+ ret = LL_MERGE_ERROR;
return ret;
}