Skip to content

Commit

Permalink
Fix confusing git-update-ref error message
Browse files Browse the repository at this point in the history
When git-update-ref has hit the "Ref %s changed to %s" error, I just stare
at it, left puzzled. This patch attempts to reword that to a more useful
and less confusing error message.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Petr Baudis authored and Junio C Hamano committed Nov 10, 2005
1 parent 14df4c4 commit ad7db62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(int argc, char **argv)

if (oldval) {
if (memcmp(currsha1, oldsha1, 20))
die("Ref %s changed to %s", refname, sha1_to_hex(currsha1));
die("Ref %s is at %s but expected %s", refname, sha1_to_hex(currsha1), sha1_to_hex(oldsha1));
/* Nothing to do? */
if (!memcmp(oldsha1, sha1, 20))
exit(0);
Expand Down

0 comments on commit ad7db62

Please sign in to comment.