summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5909651)
raw | patch | inline | side by side (parent: 5909651)
author | Finn Arne Gangstad <finnag@pvv.org> | |
Tue, 18 Dec 2007 19:50:28 +0000 (20:50 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 20 Dec 2007 00:58:42 +0000 (16:58 -0800) |
When merging conflicting submodule changes from a supermodule, generate
a conflict message saying what went wrong. Also leave the tree in a state
where git status shows the conflict, and git submodule status gives the user
enough information to do the merge manally. Previously this would just fail.
Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
a conflict message saying what went wrong. Also leave the tree in a state
where git status shows the conflict, and git submodule status gives the user
enough information to do the merge manally. Previously this would just fail.
Signed-off-by: Finn Arne Gangstad <finnag@pvv.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c | patch | blob | history |
diff --git a/merge-recursive.c b/merge-recursive.c
index 2a58dad3f43590008045282614fb0f174f3733e5..33ccc40ecd9aadb7fff05ec22b5e94b1567d878d 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
void *buf;
unsigned long size;
+ if (S_ISGITLINK(mode))
+ die("cannot read object %s '%s': It is a submodule!",
+ sha1_to_hex(sha), path);
+
buf = read_sha1_file(sha, &type, &size);
if (!buf)
die("cannot read object %s '%s'", sha1_to_hex(sha), path);
mfi = merge_file(&o, &a, &b,
branch1, branch2);
+ clean_merge = mfi.clean;
if (mfi.clean)
update_file(1, mfi.sha, mfi.mode, path);
+ else if (S_ISGITLINK(mfi.mode))
+ output(1, "CONFLICT (submodule): Merge conflict in %s "
+ "- needs %s", path, sha1_to_hex(b.sha1));
else {
- clean_merge = 0;
output(1, "CONFLICT (%s): Merge conflict in %s",
reason, path);