update cache for conflicting submodule entries
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>
Clemens Buchacher committed
Apr 5, 2009 at 02:46 UTC
0eb6574c24241b1e54be1ddff60287544faaf8d8
2 files changed
+4
-3
merge-recursive.c
+3
-2
@@ -1123,10 +1123,11 @@ static int process_entry(struct merge_options *o,
1123
clean_merge = mfi.clean;
1124
if (mfi.clean)
1125
update_file(o, 1, mfi.sha, mfi.mode, path);
1126
- else if (S_ISGITLINK(mfi.mode))
1126
+ else if (S_ISGITLINK(mfi.mode)) {
1127
output(o, 1, "CONFLICT (submodule): Merge conflict in %s "
1128
"- needs %s", path, sha1_to_hex(b.sha1));
1129
- else {
1129
+ update_file(o, 0, mfi.sha, mfi.mode, path);
1130
+ } else {
1131
output(o, 1, "CONFLICT (%s): Merge conflict in %s",
1132
reason, path);
1133
t/t7405-submodule-merge.sh
+1
-1
@@ -63,7 +63,7 @@ test_expect_failure 'merging with modify/modify conflict' '
63
64
'
65
66
-test_expect_failure 'merging with a modify/modify conflict between merge bases' '
66
+test_expect_success 'merging with a modify/modify conflict between merge bases' '
67
68
git reset --hard HEAD &&
69
git checkout -b test2 c &&