From: Junio C Hamano Date: Wed, 18 Mar 2009 01:58:55 +0000 (-0700) Subject: Merge branch 'jc/maint-1.6.0-read-tree-overlay' X-Git-Tag: v1.6.3-rc0~140 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7d4e3a72fb2d544b4a7cfd75f8626532d78fd726;p=git.git 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 --- 7d4e3a72fb2d544b4a7cfd75f8626532d78fd726 diff --cc unpack-trees.c index da2e3c091,5b0a8c172..86e28650b --- a/unpack-trees.c +++ b/unpack-trees.c @@@ -49,12 -49,12 +49,12 @@@ static void add_entry(struct unpack_tre 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); } -/* Unlink the last component and attempt to remove leading - * directories, in case this unlink is the removal of the - * last entry in the directory -- empty directories are removed. +/* + * Unlink the last component and schedule the leading directories for + * removal, such that empty directories get removed. */ static void unlink_entry(struct cache_entry *ce) {