{"thread":{"id":"2436","subject":"[PATCH] Fix confusing git-update-ref error message","startedAt":"2005-11-10T19:55:13Z","lastAt":"2005-11-10T19:55:13Z","messageCount":1,"participants":["Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"11507","messageId":"20051110195513.25573.31064.stgit@machine.or.cz","threadId":"2436","inReplyTo":null,"subject":"[PATCH] Fix confusing git-update-ref error message","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-10T19:55:13Z","receivedAt":"2005-11-10T19:55:13Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"When git-update-ref has hit the \"Ref %s changed to %s\" error, I just stare\nat it, left puzzled. This patch attempts to reword that to a more useful\nand less confusing error message.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n update-ref.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/update-ref.c b/update-ref.c\nindex 65dc3d6..d79dc52 100644\n--- a/update-ref.c\n+++ b/update-ref.c\n@@ -42,7 +42,7 @@ int main(int argc, char **argv)\n \n \tif (oldval) {\n \t\tif (memcmp(currsha1, oldsha1, 20))\n-\t\t\tdie(\"Ref %s changed to %s\", refname, sha1_to_hex(currsha1));\n+\t\t\tdie(\"Ref %s is at %s but expected %s\", refname, sha1_to_hex(currsha1), sha1_to_hex(oldsha1));\n \t\t/* Nothing to do? */\n \t\tif (!memcmp(oldsha1, sha1, 20))\n \t\t\texit(0);\n"}]}