summaryrefslogtreecommitdiff
path: root/builtin/update-ref.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-04-07 13:48:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-04-07 19:09:12 (GMT)
commitac1177553d8c632e93c507f8efc80b80e6c7d3d8 (patch)
tree9dd2989d399612a06f5a1d7eb0ced12d23cb0ea2 /builtin/update-ref.c
parent9255f059ff0bfce7605748f62f58d6ba9055a1f3 (diff)
downloadgit-ac1177553d8c632e93c507f8efc80b80e6c7d3d8.zip
git-ac1177553d8c632e93c507f8efc80b80e6c7d3d8.tar.gz
git-ac1177553d8c632e93c507f8efc80b80e6c7d3d8.tar.bz2
update-ref --stdin: simplify error messages for missing oldvalues
Instead of, for example, fatal: update refs/heads/master missing [<oldvalue>] NUL emit fatal: update refs/heads/master missing <oldvalue> Update the tests accordingly. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/update-ref.c')
-rw-r--r--builtin/update-ref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index e4c0854..a9eb5fe 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -176,7 +176,7 @@ static const char *parse_cmd_update(struct strbuf *input, const char *next)
if (*next != line_termination)
die("update %s has extra input: %s", update->ref_name, next);
} else if (!line_termination)
- die("update %s missing [<oldvalue>] NUL", update->ref_name);
+ die("update %s missing <oldvalue>", update->ref_name);
return next;
}
@@ -222,7 +222,7 @@ static const char *parse_cmd_delete(struct strbuf *input, const char *next)
if (update->have_old && is_null_sha1(update->old_sha1))
die("delete %s given zero <oldvalue>", update->ref_name);
} else if (!line_termination)
- die("delete %s missing [<oldvalue>] NUL", update->ref_name);
+ die("delete %s missing <oldvalue>", update->ref_name);
if (*next != line_termination)
die("delete %s has extra input: %s", update->ref_name, next);
@@ -245,7 +245,7 @@ static const char *parse_cmd_verify(struct strbuf *input, const char *next)
update_store_old_sha1("verify", update, value.buf);
hashcpy(update->new_sha1, update->old_sha1);
} else if (!line_termination)
- die("verify %s missing [<oldvalue>] NUL", update->ref_name);
+ die("verify %s missing <oldvalue>", update->ref_name);
if (*next != line_termination)
die("verify %s has extra input: %s", update->ref_name, next);