提交 ad7db621 编写于 作者: P Petr Baudis 提交者: Junio C Hamano

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: NPetr Baudis <pasky@suse.cz>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 14df4c41
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册