* [PATCH] checkout: add a space between the commit and "..."
@ 2010-09-28 22:23 Aaron Plattner
2010-09-28 22:40 ` Brandon Casey
2010-09-29 1:49 ` Santi Béjar
0 siblings, 2 replies; 9+ messages in thread
From: Aaron Plattner @ 2010-09-28 22:23 UTC (permalink / raw)
To: git; +Cc: jkain
Switching to a detached head prints something like
HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
These dots get selected when you double-click on the abbreviated
commit hash, which makes it annoying to copy and paste.
Add a space between the abbreviated commit and the dots, to improve
copy and pasteability.
Reported-by: Joe Kain <jkain@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
---
builtin/checkout.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index a54583b..ca1cae3 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -303,7 +303,7 @@ static void describe_detached_head(char *msg, struct commit *commit)
struct pretty_print_context ctx = {0};
parse_commit(commit);
pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, &ctx);
- fprintf(stderr, "%s %s... %s\n", msg,
+ fprintf(stderr, "%s %s ... %s\n", msg,
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
strbuf_release(&sb);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-28 22:23 [PATCH] checkout: add a space between the commit and "..." Aaron Plattner
@ 2010-09-28 22:40 ` Brandon Casey
2010-09-28 23:34 ` Kevin Ballard
` (3 more replies)
2010-09-29 1:49 ` Santi Béjar
1 sibling, 4 replies; 9+ messages in thread
From: Brandon Casey @ 2010-09-28 22:40 UTC (permalink / raw)
To: Aaron Plattner; +Cc: git, jkain
On 09/28/2010 05:23 PM, Aaron Plattner wrote:
> Switching to a detached head prints something like
>
> HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
>
> These dots get selected when you double-click on the abbreviated
> commit hash, which makes it annoying to copy and paste.
This must be another gnome-terminal/konsole "innovation".
xterm still does the "right thing"(tm) _and_ it doesn't eat my
alt keystrokes like alt-b to move the cursor back a word. /rant
-Brandon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-28 22:40 ` Brandon Casey
@ 2010-09-28 23:34 ` Kevin Ballard
2010-09-28 23:38 ` Aaron Plattner
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Kevin Ballard @ 2010-09-28 23:34 UTC (permalink / raw)
To: Brandon Casey; +Cc: Aaron Plattner, git, jkain
On Sep 28, 2010, at 3:40 PM, Brandon Casey wrote:
> On 09/28/2010 05:23 PM, Aaron Plattner wrote:
>> Switching to a detached head prints something like
>>
>> HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
>>
>> These dots get selected when you double-click on the abbreviated
>> commit hash, which makes it annoying to copy and paste.
>
> This must be another gnome-terminal/konsole "innovation".
>
> xterm still does the "right thing"(tm) _and_ it doesn't eat my
> alt keystrokes like alt-b to move the cursor back a word. /rant
FWIW, Terminal.app on OS X also does the "right thing".
-Kevin Ballard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-28 22:40 ` Brandon Casey
2010-09-28 23:34 ` Kevin Ballard
@ 2010-09-28 23:38 ` Aaron Plattner
2010-09-29 0:45 ` Brandon Casey
2010-09-29 7:20 ` Johannes Sixt
2010-09-29 21:48 ` Andreas Schwab
3 siblings, 1 reply; 9+ messages in thread
From: Aaron Plattner @ 2010-09-28 23:38 UTC (permalink / raw)
To: Brandon Casey; +Cc: git, Joe Kain
On Tue, Sep 28, 2010 at 03:40:11PM -0700, Brandon Casey wrote:
> On 09/28/2010 05:23 PM, Aaron Plattner wrote:
> > Switching to a detached head prints something like
> >
> > HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
> >
> > These dots get selected when you double-click on the abbreviated
> > commit hash, which makes it annoying to copy and paste.
>
> This must be another gnome-terminal/konsole "innovation".
>
> xterm still does the "right thing"(tm) _and_ it doesn't eat my
> alt keystrokes like alt-b to move the cursor back a word. /rant
How is your xterm configured? On my stock Ubuntu 9.10 system, it doesn't
do the "right thing"... the dots are selected. Gvim gets it right.
Also, Alt-B appears to work fine in gnome-terminal. I don't have Konsole
to try.
-- Aaron
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-28 23:38 ` Aaron Plattner
@ 2010-09-29 0:45 ` Brandon Casey
0 siblings, 0 replies; 9+ messages in thread
From: Brandon Casey @ 2010-09-29 0:45 UTC (permalink / raw)
To: Aaron Plattner; +Cc: Brandon Casey, git, Joe Kain
On Tue, Sep 28, 2010 at 6:38 PM, Aaron Plattner <aplattner@nvidia.com> wrote:
> On Tue, Sep 28, 2010 at 03:40:11PM -0700, Brandon Casey wrote:
>> On 09/28/2010 05:23 PM, Aaron Plattner wrote:
>> > Switching to a detached head prints something like
>> >
>> > HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
>> >
>> > These dots get selected when you double-click on the abbreviated
>> > commit hash, which makes it annoying to copy and paste.
>>
>> This must be another gnome-terminal/konsole "innovation".
>>
>> xterm still does the "right thing"(tm) _and_ it doesn't eat my
>> alt keystrokes like alt-b to move the cursor back a word. /rant
>
> How is your xterm configured? On my stock Ubuntu 9.10 system, it doesn't
> do the "right thing"... the dots are selected. Gvim gets it right.
Nothing special, and nothing that would affect the double-click selection
functionality as far as I know. Though I don't know what controls that.
$ cat ~/.Xresources
XTerm*geometry: 80x33
XTerm*faceName: Liberation Mono
XTerm*faceSize: 9
XTerm*foreground: green
XTerm*background: black
Centos5.X and Fedora11.
I hesitate to ask, since you /seem/ to understand that xterm,
gnome-terminal, and
konsole are three different programs, but I can also imagine there are
people who may
use the word "xterm" in a generic way to refer to all X11-based
terminal programs.
So, no offense, but are you sure you're running the program called
"xterm"? If the
answer is yes, then please ignore the rest of this paragraph. If you
are just clicking
on the terminal icon to pop-up a terminal, then try typing "xterm"
into that terminal.
The xterm program may not even be installed by default on Ubuntu
anymore (I don't
know). But I'm thinking it probably is, and that gvim may merely be
vim run inside
an xterm, and that's why the selection is working properly.
> Also, Alt-B appears to work fine in gnome-terminal. I don't have Konsole
> to try.
Ok, they recently got rid of the Tab(with an underlined 'b') menu
item. Try alt-f to go
forward by a word then. That's still intercepted by gnome.
-Brandon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-28 22:23 [PATCH] checkout: add a space between the commit and "..." Aaron Plattner
2010-09-28 22:40 ` Brandon Casey
@ 2010-09-29 1:49 ` Santi Béjar
1 sibling, 0 replies; 9+ messages in thread
From: Santi Béjar @ 2010-09-29 1:49 UTC (permalink / raw)
To: Aaron Plattner; +Cc: git, jkain
On Wed, Sep 29, 2010 at 12:23 AM, Aaron Plattner <aplattner@nvidia.com> wrote:
> Switching to a detached head prints something like
>
> HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
You should also change the message when going from one detached HEAD to another:
$ git co HEAD^
Previous HEAD position was 7bba3dd... Merge branch 'master' into next
HEAD is now at df51bf2... Merge branch 'dm/mergetool-vimdiff' into next
>
> These dots get selected when you double-click on the abbreviated
> commit hash, which makes it annoying to copy and paste.
>
> Add a space between the abbreviated commit and the dots, to improve
> copy and pasteability.
I would change it to mimic the output of "git commit", something like:
$ git co HEAD^
[HEAD was at 7bba3dd] Merge branch 'master' into next
[HEAD is now at df51bf2] Merge branch 'dm/mergetool-vimdiff' into next
HTH,
Santi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-28 22:40 ` Brandon Casey
2010-09-28 23:34 ` Kevin Ballard
2010-09-28 23:38 ` Aaron Plattner
@ 2010-09-29 7:20 ` Johannes Sixt
2010-09-29 13:13 ` Brandon Casey
2010-09-29 21:48 ` Andreas Schwab
3 siblings, 1 reply; 9+ messages in thread
From: Johannes Sixt @ 2010-09-29 7:20 UTC (permalink / raw)
To: Brandon Casey; +Cc: Aaron Plattner, git, jkain
Am 9/29/2010 0:40, schrieb Brandon Casey:
> On 09/28/2010 05:23 PM, Aaron Plattner wrote:
>> Switching to a detached head prints something like
>>
>> HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
>>
>> These dots get selected when you double-click on the abbreviated
>> commit hash, which makes it annoying to copy and paste.
>
> This must be another gnome-terminal/konsole "innovation".
>
> xterm still does the "right thing"(tm) _and_ it doesn't eat my
> alt keystrokes like alt-b to move the cursor back a word. /rant
You must be running an xterm with settings from the stone ages. I had the
impression that modern installations have the selection configured such
that a file path can be selected with a mere double-click, without
dragging. For this, the dot must be in the same class as letters and
digits. Just for reference (I don't know how to read this):
$ appres XTerm | grep charClass
*charClass: 33:48,37:48,43:48,45-47:48,64:48,126:48,95:48
That said, I welcome this change, though I'd just have dropped ... or
replaced with a colon (preference for the second).
-- Hannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-29 7:20 ` Johannes Sixt
@ 2010-09-29 13:13 ` Brandon Casey
0 siblings, 0 replies; 9+ messages in thread
From: Brandon Casey @ 2010-09-29 13:13 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Brandon Casey, Aaron Plattner, git, jkain
On Wed, Sep 29, 2010 at 2:20 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Am 9/29/2010 0:40, schrieb Brandon Casey:
>> On 09/28/2010 05:23 PM, Aaron Plattner wrote:
>>> Switching to a detached head prints something like
>>>
>>> HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
>>>
>>> These dots get selected when you double-click on the abbreviated
>>> commit hash, which makes it annoying to copy and paste.
>>
>> This must be another gnome-terminal/konsole "innovation".
>>
>> xterm still does the "right thing"(tm) _and_ it doesn't eat my
>> alt keystrokes like alt-b to move the cursor back a word. /rant
>
> You must be running an xterm with settings from the stone ages. I had the
> impression that modern installations have the selection configured such
> that a file path can be selected with a mere double-click,
Fedora 11 (and hopefully later versions), default settings.
$ appres XTerm | grep charClass; echo nada
nada
It's probably an ubuntu thing.
> without dragging.
Just right-click to extend the selection. It's a lot easier than reducing an
over-aggressive selection (read: impossible). Try using right-click to
adjust a double-click selection with and without the charClass setting
that you mention below.
> For this, the dot must be in the same class as letters and
> digits. Just for reference (I don't know how to read this):
>
> $ appres XTerm | grep charClass
> *charClass: 33:48,37:48,43:48,45-47:48,64:48,126:48,95:48
Thanks, now I know what to disable when I use ubuntu.
$ echo charClass | xrdb -remove
# Then start a new xterm
-Brandon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] checkout: add a space between the commit and "..."
2010-09-28 22:40 ` Brandon Casey
` (2 preceding siblings ...)
2010-09-29 7:20 ` Johannes Sixt
@ 2010-09-29 21:48 ` Andreas Schwab
3 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2010-09-29 21:48 UTC (permalink / raw)
To: Brandon Casey; +Cc: Aaron Plattner, git, jkain
Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> writes:
> On 09/28/2010 05:23 PM, Aaron Plattner wrote:
>> Switching to a detached head prints something like
>>
>> HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning
>>
>> These dots get selected when you double-click on the abbreviated
>> commit hash, which makes it annoying to copy and paste.
>
> This must be another gnome-terminal/konsole "innovation".
It's configurable in konsole at least (and not the default).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-09-29 21:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-28 22:23 [PATCH] checkout: add a space between the commit and "..." Aaron Plattner
2010-09-28 22:40 ` Brandon Casey
2010-09-28 23:34 ` Kevin Ballard
2010-09-28 23:38 ` Aaron Plattner
2010-09-29 0:45 ` Brandon Casey
2010-09-29 7:20 ` Johannes Sixt
2010-09-29 13:13 ` Brandon Casey
2010-09-29 21:48 ` Andreas Schwab
2010-09-29 1:49 ` Santi Béjar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.