summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f3f8b2)
raw | patch | inline | side by side (parent: 2f3f8b2)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 4 Nov 2006 20:20:09 +0000 (12:20 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 4 Nov 2006 20:20:18 +0000 (12:20 -0800) |
If more than one parents in an Octopus merge have the same
origin, ignore later ones because it would not make any
difference in the outcome.
Signed-off-by: Junio C Hamano <junkio@cox.net>
origin, ignore later ones because it would not make any
difference in the outcome.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pickaxe.c | patch | blob | history |
diff --git a/builtin-pickaxe.c b/builtin-pickaxe.c
index 97b3732419b248eba72880972e7a609e63fbcf5f..082ff45fe84d9b6cfa08f85ac05ee2860b0d64b2 100644 (file)
--- a/builtin-pickaxe.c
+++ b/builtin-pickaxe.c
i < MAXPARENT && parent;
parent = parent->next, i++) {
struct commit *p = parent->item;
+ int j, same;
if (parent_origin[i])
continue;
origin_decref(porigin);
goto finish;
}
- parent_origin[i] = porigin;
+ for (j = same = 0; j < i; j++)
+ if (!hashcmp(parent_origin[j]->blob_sha1,
+ porigin->blob_sha1)) {
+ same = 1;
+ break;
+ }
+ if (!same)
+ parent_origin[i] = porigin;
+ else
+ origin_decref(porigin);
}
}