Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 97e5954

Browse files
René Scharfegitster
authored andcommitted
unpack-trees: don't perform any index operation if we're not merging
src[0] points to the index entry in the merge case and to the first tree to unpack in the non-merge case. We only want to mark the index entry, so check first if we're merging. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 69f4e08 commit 97e5954

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unpack-trees.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
772772
if (unpack_nondirectories(n, mask, dirmask, src, names, info) < 0)
773773
return -1;
774774

775-
if (src[0]) {
775+
if (o->merge && src[0]) {
776776
if (ce_stage(src[0]))
777777
mark_ce_used_same_name(src[0], o);
778778
else

0 commit comments

Comments
 (0)