author | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Mar 2009 01:58:55 +0000 (18:58 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Mar 2009 01:58:55 +0000 (18:58 -0700) |
* jc/maint-1.6.0-read-tree-overlay:
read-tree A B C: do not create a bogus index and do not segfault
read-tree A B C: do not create a bogus index and do not segfault
1 | 2 | |||
---|---|---|---|---|
unpack-trees.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc unpack-trees.c
index da2e3c09158195e98c20a08fb97f9b37a5d5a5a5,5b0a8c1728b30ebe06d12cc0a1e8c1a08e6caaef..86e28650b887b4fcc1b05cc4d3102367df18a9ac
--- 1/unpack-trees.c
--- 2/unpack-trees.c
+++ b/unpack-trees.c
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)
{