receive-pack: drop "n/a" on unpacker errors
authorJeff King <peff@peff.net>
Fri, 21 Sep 2012 05:38:46 +0000 (01:38 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Sep 2012 16:50:13 +0000 (09:50 -0700)
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>
builtin/receive-pack.c
t/t5504-fetch-receive-strict.sh

index 2062b141d2673768a8e50dda1a2f284311795616..165a633204bed5ffc279e3af703a3d275e3e3822 100644 (file)
@@ -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;
        }
 
index 35ec294d9a56d5fc6b22ee2a39166325352bd639..69ee13c8bebbdb1303378288597420cdf70b7b88 100755 (executable)
@@ -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' '