diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2012-04-10 20:55:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-10 16:36:18 -0700 |
commit | 97e5954bdcf46c76e4a8147172ff7c5a4f633e0d (patch) | |
tree | 8e45d9a4bc4a60e44615fed5fdf2740fa7c9a8ab /unpack-trees.c | |
parent | 69f4e08f535d4e5a035069a64d1ebaea7be55d83 (diff) | |
download | git-97e5954bdcf46c76e4a8147172ff7c5a4f633e0d.tar.gz |
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 <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 7c9ecf665d..60b728e495 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -772,7 +772,7 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str if (unpack_nondirectories(n, mask, dirmask, src, names, info) < 0) return -1; - if (src[0]) { + if (o->merge && src[0]) { if (ce_stage(src[0])) mark_ce_used_same_name(src[0], o); else |