{"thread":{"id":"25279","subject":"[PATCH] checkout: add a space between the commit and \"...\"","startedAt":"2010-09-28T22:23:32Z","lastAt":"2010-09-29T21:48:21Z","messageCount":9,"participants":["Aaron Plattner","Brandon Casey","Kevin Ballard","Santi Béjar","Johannes Sixt","Andreas Schwab"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"151972","messageId":"20100928222332.GA28859@soprano.nvidia.com","threadId":"25279","inReplyTo":null,"subject":"[PATCH] checkout: add a space between the commit and \"...\"","fromName":"Aaron Plattner","fromEmail":"aplattner@nvidia.com","sentAt":"2010-09-28T22:23:32Z","receivedAt":"2010-09-28T22:23:32Z","isPatch":true,"sender":{"key":"aplattner@nvidia.com","avatar":"https://avatars.githubusercontent.com/u/343551?v=4"},"body":"Switching to a detached head prints something like\n\n  HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n\nThese dots get selected when you double-click on the abbreviated\ncommit hash, which makes it annoying to copy and paste.\n\nAdd a space between the abbreviated commit and the dots, to improve\ncopy and pasteability.\n\nReported-by: Joe Kain <jkain@nvidia.com>\nSigned-off-by: Aaron Plattner <aplattner@nvidia.com>\n---\n builtin/checkout.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex a54583b..ca1cae3 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -303,7 +303,7 @@ static void describe_detached_head(char *msg, struct commit *commit)\n \tstruct pretty_print_context ctx = {0};\n \tparse_commit(commit);\n \tpretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, &ctx);\n-\tfprintf(stderr, \"%s %s... %s\\n\", msg,\n+\tfprintf(stderr, \"%s %s ... %s\\n\", msg,\n \t\tfind_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);\n \tstrbuf_release(&sb);\n }\n-- \n1.7.0.4\n"},{"id":"151982","messageId":"tNUxsuXC1ZklaaYn-pkW6hae44B_tB2hStuto66EU4k9w2Q79GA6LQ@cipher.nrlssc.navy.mil","threadId":"25279","inReplyTo":"20100928222332.GA28859@soprano.nvidia.com","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Brandon Casey","fromEmail":"brandon.casey.ctr@nrlssc.navy.mil","sentAt":"2010-09-28T22:40:11Z","receivedAt":"2010-09-28T22:40:11Z","isPatch":true,"sender":{"key":"brandon.casey.ctr@nrlssc.navy.mil","avatar":null},"body":"On 09/28/2010 05:23 PM, Aaron Plattner wrote:\n> Switching to a detached head prints something like\n> \n>   HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n> \n> These dots get selected when you double-click on the abbreviated\n> commit hash, which makes it annoying to copy and paste.\n\nThis must be another gnome-terminal/konsole \"innovation\".\n\nxterm still does the \"right thing\"(tm) _and_ it doesn't eat my\nalt keystrokes like alt-b to move the cursor back a word. /rant\n\n-Brandon\n"},{"id":"151984","messageId":"79D95DE3-74CB-4051-87D9-CBF363153ED0@sb.org","threadId":"25279","inReplyTo":"tNUxsuXC1ZklaaYn-pkW6hae44B_tB2hStuto66EU4k9w2Q79GA6LQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2010-09-28T23:34:14Z","receivedAt":"2010-09-28T23:34:14Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"On Sep 28, 2010, at 3:40 PM, Brandon Casey wrote:\n\n> On 09/28/2010 05:23 PM, Aaron Plattner wrote:\n>> Switching to a detached head prints something like\n>> \n>>  HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n>> \n>> These dots get selected when you double-click on the abbreviated\n>> commit hash, which makes it annoying to copy and paste.\n> \n> This must be another gnome-terminal/konsole \"innovation\".\n> \n> xterm still does the \"right thing\"(tm) _and_ it doesn't eat my\n> alt keystrokes like alt-b to move the cursor back a word. /rant\n\nFWIW, Terminal.app on OS X also does the \"right thing\".\n\n-Kevin Ballard"},{"id":"151985","messageId":"20100928233832.GA20224@soprano.nvidia.com","threadId":"25279","inReplyTo":"tNUxsuXC1ZklaaYn-pkW6hae44B_tB2hStuto66EU4k9w2Q79GA6LQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Aaron Plattner","fromEmail":"aplattner@nvidia.com","sentAt":"2010-09-28T23:38:32Z","receivedAt":"2010-09-28T23:38:32Z","isPatch":true,"sender":{"key":"aplattner@nvidia.com","avatar":"https://avatars.githubusercontent.com/u/343551?v=4"},"body":"On Tue, Sep 28, 2010 at 03:40:11PM -0700, Brandon Casey wrote:\n> On 09/28/2010 05:23 PM, Aaron Plattner wrote:\n> > Switching to a detached head prints something like\n> > \n> >   HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n> > \n> > These dots get selected when you double-click on the abbreviated\n> > commit hash, which makes it annoying to copy and paste.\n> \n> This must be another gnome-terminal/konsole \"innovation\".\n> \n> xterm still does the \"right thing\"(tm) _and_ it doesn't eat my\n> alt keystrokes like alt-b to move the cursor back a word. /rant\n\nHow is your xterm configured?  On my stock Ubuntu 9.10 system, it doesn't\ndo the \"right thing\"... the dots are selected.  Gvim gets it right.\n\nAlso, Alt-B appears to work fine in gnome-terminal.  I don't have Konsole\nto try.\n\n-- Aaron\n"},{"id":"152005","messageId":"AANLkTikXEfBdd6sDS9iJ0ULN-jihha+U4JZxRFG+SRFG@mail.gmail.com","threadId":"25279","inReplyTo":"20100928233832.GA20224@soprano.nvidia.com","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Brandon Casey","fromEmail":"drafnel@gmail.com","sentAt":"2010-09-29T00:45:25Z","receivedAt":"2010-09-29T00:45:25Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On Tue, Sep 28, 2010 at 6:38 PM, Aaron Plattner <aplattner@nvidia.com> wrote:\n> On Tue, Sep 28, 2010 at 03:40:11PM -0700, Brandon Casey wrote:\n>> On 09/28/2010 05:23 PM, Aaron Plattner wrote:\n>> > Switching to a detached head prints something like\n>> >\n>> >   HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n>> >\n>> > These dots get selected when you double-click on the abbreviated\n>> > commit hash, which makes it annoying to copy and paste.\n>>\n>> This must be another gnome-terminal/konsole \"innovation\".\n>>\n>> xterm still does the \"right thing\"(tm) _and_ it doesn't eat my\n>> alt keystrokes like alt-b to move the cursor back a word. /rant\n>\n> How is your xterm configured?  On my stock Ubuntu 9.10 system, it doesn't\n> do the \"right thing\"... the dots are selected.  Gvim gets it right.\n\nNothing special, and nothing that would affect the double-click selection\nfunctionality as far as I know.  Though I don't know what controls that.\n\n   $ cat ~/.Xresources\n   XTerm*geometry: 80x33\n   XTerm*faceName: Liberation Mono\n   XTerm*faceSize: 9\n   XTerm*foreground: green\n   XTerm*background: black\n\nCentos5.X and Fedora11.\n\nI hesitate to ask, since you /seem/ to understand that xterm,\ngnome-terminal, and\nkonsole are three different programs, but I can also imagine there are\npeople who may\nuse the word \"xterm\" in a generic way to refer to all X11-based\nterminal programs.\nSo, no offense, but  are you sure you're running the program called\n\"xterm\"?  If the\nanswer is yes, then please ignore the rest of this paragraph.  If you\nare just clicking\non the terminal icon to pop-up a terminal, then try typing \"xterm\"\ninto that terminal.\nThe xterm program may not even be installed by default on Ubuntu\nanymore (I don't\nknow).  But I'm thinking it probably is, and that gvim may merely be\nvim run inside\nan xterm, and that's why the selection is working properly.\n\n> Also, Alt-B appears to work fine in gnome-terminal.  I don't have Konsole\n> to try.\n\nOk, they recently got rid of the Tab(with an underlined 'b') menu\nitem. Try alt-f to go\nforward by a word then.  That's still intercepted by gnome.\n\n-Brandon\n"},{"id":"152006","messageId":"AANLkTimLZwG5dOy2+rP0eKTp0DmRnaTYf7h3OBsL5fhM@mail.gmail.com","threadId":"25279","inReplyTo":"20100928222332.GA28859@soprano.nvidia.com","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2010-09-29T01:49:59Z","receivedAt":"2010-09-29T01:49:59Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Wed, Sep 29, 2010 at 12:23 AM, Aaron Plattner <aplattner@nvidia.com> wrote:\n> Switching to a detached head prints something like\n>\n>  HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n\nYou should also change the message when going from one detached HEAD to another:\n\n$ git co HEAD^\nPrevious HEAD position was 7bba3dd... Merge branch 'master' into next\nHEAD is now at df51bf2... Merge branch 'dm/mergetool-vimdiff' into next\n\n>\n> These dots get selected when you double-click on the abbreviated\n> commit hash, which makes it annoying to copy and paste.\n>\n> Add a space between the abbreviated commit and the dots, to improve\n> copy and pasteability.\n\nI would change it to mimic the output of \"git commit\", something like:\n\n$ git co HEAD^\n[HEAD was at 7bba3dd] Merge branch 'master' into next\n[HEAD is now at df51bf2] Merge branch 'dm/mergetool-vimdiff' into next\n\nHTH,\nSanti\n"},{"id":"152024","messageId":"4CA2E8C7.4040100@viscovery.net","threadId":"25279","inReplyTo":"tNUxsuXC1ZklaaYn-pkW6hae44B_tB2hStuto66EU4k9w2Q79GA6LQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-09-29T07:20:39Z","receivedAt":"2010-09-29T07:20:39Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 9/29/2010 0:40, schrieb Brandon Casey:\n> On 09/28/2010 05:23 PM, Aaron Plattner wrote:\n>> Switching to a detached head prints something like\n>>\n>>   HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n>>\n>> These dots get selected when you double-click on the abbreviated\n>> commit hash, which makes it annoying to copy and paste.\n> \n> This must be another gnome-terminal/konsole \"innovation\".\n> \n> xterm still does the \"right thing\"(tm) _and_ it doesn't eat my\n> alt keystrokes like alt-b to move the cursor back a word. /rant\n\nYou must be running an xterm with settings from the stone ages. I had the\nimpression that modern installations have the selection configured such\nthat a file path can be selected with a mere double-click, without\ndragging. For this, the dot must be in the same class as letters and\ndigits. Just for reference (I don't know how to read this):\n\n$ appres XTerm | grep charClass\n*charClass:     33:48,37:48,43:48,45-47:48,64:48,126:48,95:48\n\nThat said, I welcome this change, though I'd just have dropped ... or\nreplaced with a colon (preference for the second).\n\n-- Hannes\n"},{"id":"152050","messageId":"AANLkTimRhvsozBJ+8Jup75nRgzoHAmCQ3_96qLPU_b0B@mail.gmail.com","threadId":"25279","inReplyTo":"4CA2E8C7.4040100@viscovery.net","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Brandon Casey","fromEmail":"drafnel@gmail.com","sentAt":"2010-09-29T13:13:27Z","receivedAt":"2010-09-29T13:13:27Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On Wed, Sep 29, 2010 at 2:20 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:\n> Am 9/29/2010 0:40, schrieb Brandon Casey:\n>> On 09/28/2010 05:23 PM, Aaron Plattner wrote:\n>>> Switching to a detached head prints something like\n>>>\n>>>   HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n>>>\n>>> These dots get selected when you double-click on the abbreviated\n>>> commit hash, which makes it annoying to copy and paste.\n>>\n>> This must be another gnome-terminal/konsole \"innovation\".\n>>\n>> xterm still does the \"right thing\"(tm) _and_ it doesn't eat my\n>> alt keystrokes like alt-b to move the cursor back a word. /rant\n>\n> You must be running an xterm with settings from the stone ages. I had the\n> impression that modern installations have the selection configured such\n> that a file path can be selected with a mere double-click,\n\nFedora 11 (and hopefully later versions), default settings.\n\n   $ appres XTerm | grep charClass; echo nada\n   nada\n\nIt's probably an ubuntu thing.\n\n> without dragging.\n\nJust right-click to extend the selection.  It's a lot easier than reducing an\nover-aggressive selection (read: impossible).  Try using right-click to\nadjust a double-click selection with and without the charClass setting\nthat you mention below.\n\n> For this, the dot must be in the same class as letters and\n> digits. Just for reference (I don't know how to read this):\n>\n> $ appres XTerm | grep charClass\n> *charClass:     33:48,37:48,43:48,45-47:48,64:48,126:48,95:48\n\nThanks, now I know what to disable when I use ubuntu.\n\n   $ echo charClass | xrdb -remove\n   # Then start a new xterm\n\n-Brandon\n"},{"id":"152094","messageId":"m28w2kb4re.fsf@igel.home","threadId":"25279","inReplyTo":"tNUxsuXC1ZklaaYn-pkW6hae44B_tB2hStuto66EU4k9w2Q79GA6LQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] checkout: add a space between the commit and \"...\"","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-09-29T21:48:21Z","receivedAt":"2010-09-29T21:48:21Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> writes:\n\n> On 09/28/2010 05:23 PM, Aaron Plattner wrote:\n>> Switching to a detached head prints something like\n>> \n>>   HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning\n>> \n>> These dots get selected when you double-click on the abbreviated\n>> commit hash, which makes it annoying to copy and paste.\n>\n> This must be another gnome-terminal/konsole \"innovation\".\n\nIt's configurable in konsole at least (and not the default).\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"}]}