X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=fast-import.c;h=60f26fe473ad6922166e952f4f7e5be2b79d45de;hb=ad5aeeded3295589b2573b143f754762a56f8f82;hp=785776086ccc22dcd5488e3ac0bad3318f57043e;hpb=b20e9b0b521a416b00a81d6c4788dfd2df25efc0;p=git.git diff --git a/fast-import.c b/fast-import.c index 785776086..60f26fe47 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",