X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=fast-import.c;h=b3ba778924908946a0e20ebfdae9bc2058e8a55e;hb=ded7e0491b78e3e8384bcd9f63918c52785c4cd6;hp=785776086ccc22dcd5488e3ac0bad3318f57043e;hpb=48e0ad033ffd009df1283858ac70ac53660e2d7c;p=git.git diff --git a/fast-import.c b/fast-import.c index 785776086..b3ba77892 100644 --- a/fast-import.c +++ b/fast-import.c @@ -166,8 +166,7 @@ Format of STDIN stream: #define DEPTH_BITS 13 #define MAX_DEPTH ((1<pack_name, tmpfile); p->pack_fd = pack_fd; + p->do_not_close = 1; pack_file = sha1fd(pack_fd, p->pack_name); hdr.hdr_signature = htonl(PACK_SIGNATURE); @@ -2231,6 +2218,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 +2978,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; }