Skip to content

Commit 74eb32d

Browse files
peffgitster
authored andcommitted
receive-pack: drop "n/a" on unpacker errors
The output from git push currently looks like this: $ git push dest HEAD fatal: [some message from index-pack] error: unpack failed: index-pack abnormal exit To dest ! [remote rejected] HEAD -> master (n/a (unpacker error)) That n/a is meant to be "the per-ref status is not available" but the nested parentheses just make it look ugly. Let's turn the final line into just: ! [remote rejected] HEAD -> master (unpacker error) Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a22e6f8 commit 74eb32d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

builtin/receive-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ static void execute_commands(struct command *commands, const char *unpacker_erro
701701

702702
if (unpacker_error) {
703703
for (cmd = commands; cmd; cmd = cmd->next)
704-
cmd->error_string = "n/a (unpacker error)";
704+
cmd->error_string = "unpacker error";
705705
return;
706706
}
707707

t/t5504-fetch-receive-strict.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ test_expect_success 'push with !receive.fsckobjects' '
8989

9090
cat >exp <<EOF
9191
To dst
92-
! refs/heads/master:refs/heads/test [remote rejected] (n/a (unpacker error))
92+
! refs/heads/master:refs/heads/test [remote rejected] (unpacker error)
9393
EOF
9494

9595
test_expect_success 'push with receive.fsckobjects' '

0 commit comments

Comments
 (0)