Fix confusing git-update-ref error message
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>
Petr Baudis committed
Nov 10, 2005 at 20:55 UTC
ad7db62113368279a1b6994790bf30925fabea33
1 file changed
+1
-1
update-ref.c
+1
-1
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
42
43
if (oldval) {
44
if (memcmp(currsha1, oldsha1, 20))
45
- die("Ref %s changed to %s", refname, sha1_to_hex(currsha1));
45
+ die("Ref %s is at %s but expected %s", refname, sha1_to_hex(currsha1), sha1_to_hex(oldsha1));
46
/* Nothing to do? */
47
if (!memcmp(oldsha1, sha1, 20))
48
exit(0);