summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f37ae35)
raw | patch | inline | side by side (parent: f37ae35)
author | Clemens Buchacher <drizzd@aon.at> | |
Sun, 5 Apr 2009 00:46:59 +0000 (02:46 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 5 Apr 2009 07:26:32 +0000 (00:26 -0700) |
When merging merge bases during a recursive merge we do not want to
leave any unmerged entries. Otherwise we cannot create a temporary
tree for the recursive merge to work with.
We failed to do so in case of a submodule conflict between merge
bases, causing a NULL pointer dereference in the next step of the
recursive merge.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
leave any unmerged entries. Otherwise we cannot create a temporary
tree for the recursive merge to work with.
We failed to do so in case of a submodule conflict between merge
bases, causing a NULL pointer dereference in the next step of the
recursive merge.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c | patch | blob | history | |
t/t7405-submodule-merge.sh | patch | blob | history |
diff --git a/merge-recursive.c b/merge-recursive.c
index ee853b990d8bfb15e0058fefbbd267bd58ed40fc..3618c94bd2e4722bab29bff8ee7d530c430029ce 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
clean_merge = mfi.clean;
if (mfi.clean)
update_file(o, 1, mfi.sha, mfi.mode, path);
- else if (S_ISGITLINK(mfi.mode))
+ else if (S_ISGITLINK(mfi.mode)) {
output(o, 1, "CONFLICT (submodule): Merge conflict in %s "
"- needs %s", path, sha1_to_hex(b.sha1));
- else {
+ update_file(o, 0, mfi.sha, mfi.mode, path);
+ } else {
output(o, 1, "CONFLICT (%s): Merge conflict in %s",
reason, path);
index 9778ad49cf1c8ac344f20eb50ef0a88e2b2668aa..aa6c44ce4f5855bd4f18f737c7b1239407549eab 100755 (executable)
'
-test_expect_failure 'merging with a modify/modify conflict between merge bases' '
+test_expect_success 'merging with a modify/modify conflict between merge bases' '
git reset --hard HEAD &&
git checkout -b test2 c &&