summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fast-import.c4
-rwxr-xr-xt/t9300-fast-import.sh2
2 files changed, 5 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 78d978684d..c07f155723 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1971,6 +1971,10 @@ static char *parse_ident(const char *buf)
size_t name_len;
char *ident;
+ /* ensure there is a space delimiter even if there is no name */
+ if (*buf == '<')
+ --buf;
+
gt = strrchr(buf, '>');
if (!gt)
die("Missing > in ident string: %s", buf);
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index a659dd408f..09ef6ba1d9 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -352,7 +352,7 @@ data <<COMMIT
empty commit
COMMIT
INPUT_END
-test_expect_failure 'B: accept and fixup committer with no name' '
+test_expect_success 'B: accept and fixup committer with no name' '
git fast-import <input &&
out=$(git fsck) &&
echo "$out" &&