{"thread":{"id":"18461","subject":"[PATCH] git-branch: display \"was sha1\" on branch deletion rather than just \"sha1\"","startedAt":"2009-03-22T00:09:17Z","lastAt":"2009-03-22T15:11:43Z","messageCount":3,"participants":["Brandon Casey","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"108861","messageId":"ee63ef30903211709s24f8294dq9ea52bcae72b755a@mail.gmail.com","threadId":"18461","inReplyTo":null,"subject":"[PATCH] git-branch: display \"was sha1\" on branch deletion rather than just \"sha1\"","fromName":"Brandon Casey","fromEmail":"drafnel@gmail.com","sentAt":"2009-03-22T00:09:17Z","receivedAt":"2009-03-22T00:09:17Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Make it more pleasant to read about a branch deletion by adding \"was\".\nJeff King suggested this, and I ignored it.  He was right.\n\nUpdate t3200 test again to match the change in output.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n builtin-branch.c  |    2 +-\n t/t3200-branch.sh |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-branch.c b/builtin-branch.c\nindex 14d4b91..07a440e 100644\n--- a/builtin-branch.c\n+++ b/builtin-branch.c\n@@ -171,7 +171,7 @@ static int delete_branches(int argc, const char\n**argv, int force, int kinds)\n \t\t\tret = 1;\n \t\t} else {\n \t\t\tstruct strbuf buf = STRBUF_INIT;\n-\t\t\tprintf(\"Deleted %sbranch %s (%s).\\n\", remote,\n+\t\t\tprintf(\"Deleted %sbranch %s (was %s).\\n\", remote,\n \t\t\t       bname.buf,\n \t\t\t       find_unique_abbrev(sha1, DEFAULT_ABBREV));\n \t\t\tstrbuf_addf(&buf, \"branch.%s\", bname.buf);\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex 61a2010..1b1e9ec 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -195,7 +195,7 @@ test_expect_success 'test deleting branch deletes\nbranch config' \\\n test_expect_success 'test deleting branch without config' \\\n     'git branch my7 s &&\n      sha1=$(git rev-parse my7 | cut -c 1-7) &&\n-     test \"$(git branch -d my7 2>&1)\" = \"Deleted branch my7 ($sha1).\"'\n+     test \"$(git branch -d my7 2>&1)\" = \"Deleted branch my7 (was $sha1).\"'\n\n test_expect_success 'test --track without .fetch entries' \\\n     'git branch --track my8 &&\n-- \n1.6.2.12.g83676\n"},{"id":"108879","messageId":"20090322061320.GB14765@coredump.intra.peff.net","threadId":"18461","inReplyTo":"ee63ef30903211709s24f8294dq9ea52bcae72b755a@mail.gmail.com","subject":"Re: [PATCH] git-branch: display \"was sha1\" on branch deletion rather than just \"sha1\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-22T06:13:20Z","receivedAt":"2009-03-22T06:13:20Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Mar 21, 2009 at 07:09:17PM -0500, Brandon Casey wrote:\n\n> Make it more pleasant to read about a branch deletion by adding \"was\".\n> Jeff King suggested this, and I ignored it.  He was right.\n\nHeh. While I am tempted to dance in a circle shouting \"I told you so\", I\nactually find that after getting used to it, I do not mind the current\noutput. ;)\n\nOut of curiosity, what prompted your change of heart? Did you hear from\nsomebody who found it confusing, or did you just change your mind?\n\n-Peff\n"},{"id":"108901","messageId":"ee63ef30903220811m69c45e9cna0af52a3b5a851fe@mail.gmail.com","threadId":"18461","inReplyTo":"20090322061320.GB14765@coredump.intra.peff.net","subject":"Re: [PATCH] git-branch: display \"was sha1\" on branch deletion rather than just \"sha1\"","fromName":"Brandon Casey","fromEmail":"drafnel@gmail.com","sentAt":"2009-03-22T15:11:43Z","receivedAt":"2009-03-22T15:11:43Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On Sun, Mar 22, 2009 at 1:13 AM, Jeff King <peff@peff.net> wrote:\n> On Sat, Mar 21, 2009 at 07:09:17PM -0500, Brandon Casey wrote:\n>\n>> Make it more pleasant to read about a branch deletion by adding \"was\".\n>> Jeff King suggested this, and I ignored it.  He was right.\n>\n> Heh. While I am tempted to dance in a circle shouting \"I told you so\", I\n> actually find that after getting used to it, I do not mind the current\n> output. ;)\n>\n> Out of curiosity, what prompted your change of heart? Did you hear from\n> somebody who found it confusing, or did you just change your mind?\n\nI just changed my mind.\n\nMy original opinion was based on the output from 'git stash drop'.  It\nhas the full sha1 in the message and looks like:\n\n  $git stash drop\n  Dropped refs/stash@{0} (58fa28fddd951deb782e3300b2d059f95544f6f1)\n\nI like it. I like the full sha1.\n\nFor some reason, the partial sha1 in the branch delete message irritated me.\n\n  $ git branch -d mybranch\n  Deleted branch mybranch (455f59b).\n\nI don't think it was because it was a partial sha1.  Maybe it was\nbecause the message seemed to imply that what was referenced by the\nsha1 was being deleted.  The branch is just a pointer, so deleting it\ndoes not mean that what it pointed at was lost in any way.  I think\nadding \"was\" makes it seem more like a pointer to me.  Or maybe it has\nsomething to do with my mother, any psychology majors in the audience?\n:)\n\n-brandon\n"}]}