X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=fast-import.c;h=970d8470ed7c350337f28570fd2c111186a7941d;hb=49151d8b2cde68bc110a8bb899b8610631430941;hp=785776086ccc22dcd5488e3ac0bad3318f57043e;hpb=41cd7974b0b67b78c39bccc86718dbe19390f768;p=thirdparty%2Fgit.git diff --git a/fast-import.c b/fast-import.c index 785776086c..970d8470ed 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", @@ -2985,6 +2991,8 @@ static int parse_one_feature(const char *feature, int from_stream) relative_marks_paths = 0; } else if (!prefixcmp(feature, "force")) { force_update = 1; + } else if (!strcmp(feature, "notes")) { + ; /* do nothing; we have the feature */ } else { return 0; }