summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-01-27 10:27:49 -0800
committerJunio C Hamano <gitster@pobox.com>2011-01-27 10:27:49 -0800
commit99e63ef24e18c8ca918922b052de96a8ceca48a4 (patch)
treef51f4546f505b9387b0b44f0cfeee1ed27217ad0 /fast-import.c
parent630fc7878b6fd1bc188d4916b64f4df37658df96 (diff)
parent960ac5ff99304404d287b8174d7c8a7743c6d97a (diff)
downloadgit-99e63ef24e18c8ca918922b052de96a8ceca48a4.tar.gz
Merge branch 'maint'
* maint: rebase -i: clarify in-editor documentation of "exec" tests: sanitize more git environment variables fast-import: treat filemodify with empty tree as delete rebase: give a better error message for bogus branch rebase: use explicit "--" with checkout Conflicts: t/t9300-fast-import.sh
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fast-import.c b/fast-import.c
index 785776086c..60f26fe473 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2231,6 +2231,12 @@ static void file_change_m(struct branch *b)
p = uq.buf;
}
+ /* Git does not track empty, non-toplevel directories. */
+ if (S_ISDIR(mode) && !memcmp(sha1, EMPTY_TREE_SHA1_BIN, 20) && *p) {
+ tree_content_remove(&b->branch_tree, p, NULL);
+ return;
+ }
+
if (S_ISGITLINK(mode)) {
if (inline_data)
die("Git links cannot be specified 'inline': %s",