summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b2c8c0a)
raw | patch | inline | side by side (parent: b2c8c0a)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Mar 2011 05:22:06 +0000 (22:22 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Mar 2011 05:22:06 +0000 (22:22 -0700) |
Running checks against working tree (e.g. lstat()) and causing
changes to working tree (e.g. unlink()) while building a virtual
ancestor merge does not make any sense. Avoid doing so.
This is not a real fix; it is another magic band-aid on top of
another band-aid we placed earlier.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
changes to working tree (e.g. unlink()) while building a virtual
ancestor merge does not make any sense. Avoid doing so.
This is not a real fix; it is another magic band-aid on top of
another band-aid we placed earlier.
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 847bc8494ff1e7610b6dbb76c9c368efdf903ccd..59482ffc87f7ae0b2004e3f1bbb467d199a3bcde 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
struct stage_data *last_e;
int i;
+ /*
+ * Do not do any of this crazyness during the recursive; we don't
+ * even write anything to the working tree!
+ */
+ if (o->call_depth)
+ return;
+
for (i = 0; i < entries->nr; i++) {
const char *path = entries->items[i].string;
int len = strlen(path);
if (mfi.clean && !df_conflict_remains &&
sha_eq(mfi.sha, a_sha) && mfi.mode == a.mode &&
- lstat(path, &st) == 0) {
+ !o->call_depth && !lstat(path, &st)) {
output(o, 3, "Skipped %s (merged same as existing)", path);
add_cacheinfo(mfi.mode, mfi.sha, path,
0 /*stage*/, 1 /*refresh*/, 0 /*options*/);