summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 14df4c4)
raw | patch | inline | side by side (parent: 14df4c4)
author | Petr Baudis <pasky@suse.cz> | |
Thu, 10 Nov 2005 19:55:13 +0000 (20:55 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 10 Nov 2005 23:57:21 +0000 (15:57 -0800) |
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>
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>
update-ref.c | patch | blob | history |
diff --git a/update-ref.c b/update-ref.c
index 65dc3d6385756a11aac257a3ed6a9dfcb68cce53..d79dc52fd7d1eb1117e37c6b400c5f99bc8e4fcd 100644 (file)
--- a/update-ref.c
+++ b/update-ref.c
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);