Re: [PATCH 3/3] git abbref-ref: new porcelain for abbreviate_ref()

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 3/3] git abbref-ref: new porcelain for abbreviate_ref()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:23

"Shawn O. Pearce" [off-list ref] writes:
Bert Wesarg [off-list ref] wrote:
quoted
This gives direct access to the abbreviate_ref() function. The operation
mode defaults to the core.warnambiguousrefs value, like the refname:short
format, but can be explicitly changed with the --{,no}-strict option.

The bash completion script utilizes this new command.
And it slows down too, doesn't it?  Now we are doing a fork per
branch during completion.  Yikes.  Didn't you just post a series
about making completion faster?
 
quoted
Junio, if this is not a porcelain, tell me.
IMHO its plumbing.  Porcelain is used by a human.  Plumbing is the
bits needed to make human interfaces.
Shawn is right.

I wouldn't be taking this patch to add a new command, but I suspect that
this could be an option to rev-parse that is similar to --symbolic.

Teach SHOW_SYMBOLIC_SHORTEST to builtin-rev-parse.c::show_rev(), teach the
parser cmd_rev_parse() a new option --symbolic-abbrev and you are done,
right?

By the way, I found it amusing to see Cc: lines _after_ three dashes to
control send-email --- nice trick I didn't think of ;-)

Re: [PATCH 3/3] git abbref-ref: new porcelain for abbreviate_ref()

From: Bert Wesarg <hidden>
Date: 2016-06-15 22:45:23

On Mon, Sep 22, 2008 at 17:55, Junio C Hamano [off-list ref] wrote:
"Shawn O. Pearce" [off-list ref] writes:
quoted
Bert Wesarg [off-list ref] wrote:
quoted
This gives direct access to the abbreviate_ref() function. The operation
mode defaults to the core.warnambiguousrefs value, like the refname:short
format, but can be explicitly changed with the --{,no}-strict option.

The bash completion script utilizes this new command.
And it slows down too, doesn't it?  Now we are doing a fork per
branch during completion.  Yikes.  Didn't you just post a series
about making completion faster?
quoted
Junio, if this is not a porcelain, tell me.
IMHO its plumbing.  Porcelain is used by a human.  Plumbing is the
bits needed to make human interfaces.
Shawn is right.

I wouldn't be taking this patch to add a new command, but I suspect that
this could be an option to rev-parse that is similar to --symbolic.

Teach SHOW_SYMBOLIC_SHORTEST to builtin-rev-parse.c::show_rev(), teach the
parser cmd_rev_parse() a new option --symbolic-abbrev and you are done,
right?
You are probably right, that this small functionality could fit into
an existing program.
But I haven't look for one.
By the way, I found it amusing to see Cc: lines _after_ three dashes to
control send-email --- nice trick I didn't think of ;-)
The only problem is, that git format-patch outputs '---\n'
unconditionally, so I had to remove the second one by hand.

Bert

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help