diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:55 -0700 |
commit | 7d4e3a72fb2d544b4a7cfd75f8626532d78fd726 (patch) | |
tree | 3001d2f6f301f60a06406e6a138ad081bddefaec /unpack-trees.c | |
parent | 9d5b05c6d56a0fb12d43d50d7853178feaf59daa (diff) | |
parent | aab3b9a1aa3b7d082088ab014480b5d81c437624 (diff) | |
download | git-7d4e3a72fb2d544b4a7cfd75f8626532d78fd726.tar.gz |
Merge branch 'jc/maint-1.6.0-read-tree-overlay'
* jc/maint-1.6.0-read-tree-overlay:
read-tree A B C: do not create a bogus index and do not segfault
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index da2e3c0915..86e28650b8 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -49,7 +49,7 @@ static void add_entry(struct unpack_trees_options *o, struct cache_entry *ce, memcpy(new, ce, size); new->next = NULL; new->ce_flags = (new->ce_flags & ~clear) | set; - add_index_entry(&o->result, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE|ADD_CACHE_SKIP_DFCHECK); + add_index_entry(&o->result, new, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE); } /* @@ -266,9 +266,9 @@ static int unpack_nondirectories(int n, unsigned long mask, if (o->merge) return call_unpack_fn(src, o); - n += o->merge; for (i = 0; i < n; i++) - add_entry(o, src[i], 0, 0); + if (src[i] && src[i] != o->df_conflict_entry) + add_entry(o, src[i], 0, 0); return 0; } |