Skip to content

Commit

Permalink
receive-pack: drop "n/a" on unpacker errors
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Sep 21, 2012
1 parent a22e6f8 commit 74eb32d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builtin/receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ static void execute_commands(struct command *commands, const char *unpacker_erro

if (unpacker_error) {
for (cmd = commands; cmd; cmd = cmd->next)
cmd->error_string = "n/a (unpacker error)";
cmd->error_string = "unpacker error";
return;
}

Expand Down
2 changes: 1 addition & 1 deletion t/t5504-fetch-receive-strict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test_expect_success 'push with !receive.fsckobjects' '

cat >exp <<EOF
To dst
! refs/heads/master:refs/heads/test [remote rejected] (n/a (unpacker error))
! refs/heads/master:refs/heads/test [remote rejected] (unpacker error)
EOF

test_expect_success 'push with receive.fsckobjects' '
Expand Down

0 comments on commit 74eb32d

Please sign in to comment.