Jonathan Nieder wrote:
It has a semantic conflict with the fast-import-ls-fixes series that
I sent separately
[...]
I'll send a fixup patch as a reply, for squashing into the merge or
this patch, whichever is the first commit that contains both topics.
With this tweak, the merge passes the merged set of tests.
diff --git i/fast-import.c c/fast-import.c
index 51cdda29..fe1c8643 100644
--- i/fast-import.c
+++ c/fast-import.c
@@ -1658,8 +1658,6 @@ static int tree_content_get(
n = slash1 - p;
else
n = strlen(p);
- if (!n)
- die("Empty path component found in input");
if (!root->tree)
load_tree(root);@@ -1669,6 +1667,8 @@ static int tree_content_get(
if (e->name->str_len == n && !strncmp_icase(p, e->name->str_dat, n)) {
if (!slash1)
goto last_component;
+ if (!slash1[1])
+ die("Empty path component found in input");
if (!S_ISDIR(e->versions[1].mode))
return 0;
if (!e->tree)