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 <>
Maybe it is just me, but I have always found the "n/a" and extra
parentheses ugly and unnecessary. But obviously others may differ.
It doesn't really come up that often, since index-pack failing usually
implies a git bug. But with transfer.fsckObjects turn on, it is more

I don't think there should be any backwards compatibility issues with
changing this. The "reason" field sent back by receive-pack has always
been a free-form human-readable string.

I also dislike the "index-pack abnormal exit" message. Again, when
index-pack really crashes, it's fine, but it can die due to bogus
objects, too, in which case it might be nice to have a more
human-readable message.

 builtin/receive-pack.c          | 2 +-
 t/ | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index ac679ab..ff781fe 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -695,7 +695,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";
diff --git a/t/ b/t/
index 35ec294..69ee13c 100755
--- a/t/
+++ b/t/
@@ -89,7 +89,7 @@ To dst
 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 
 test_expect_success 'push with receive.fsckobjects' '
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to