Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Johan Herland
On Mon, May 6, 2013 at 7:52 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: ... there is AFAICS _no_ way for sscanf() - having already done one or more format extractions - to indicate to its caller that the input fails to match the trailing part of the

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: New version coming up. I'm going to rip this patch out of the surrounding series, since it doesn't really belong there anyway. Thanks; will queue. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: On Mon, May 6, 2013 at 7:52 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: ... there is AFAICS _no_ way for sscanf() - having already done one or more format extractions - to indicate to its caller that the input

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Johan Herland
On Tue, May 7, 2013 at 11:31 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: On Mon, May 6, 2013 at 7:52 PM, Junio C Hamano gits...@pobox.com wrote: It is interesting that this bug has stayed so long with us, which may indicate that nobody actually uses the

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: ...oops, I see I forgot the trailing on this line. Do you want a resend, or fix up yourself? I've pushed out a heavily fixed-up version on 'pu', mostly for styles and some log message changes to describe when it is not a symref. -- To unsubscribe from

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-07 Thread Johan Herland
On Wed, May 8, 2013 at 12:06 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: ...oops, I see I forgot the trailing on this line. Do you want a resend, or fix up yourself? I've pushed out a heavily fixed-up version on 'pu', mostly for styles and some log

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-06 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: ... there is AFAICS _no_ way for sscanf() - having already done one or more format extractions - to indicate to its caller that the input fails to match the trailing part of the format string. Yeah, we can detect when we did not have enough, but we

Re: [PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-05 Thread Bert Wesarg
On Sun, May 5, 2013 at 1:55 AM, Johan Herland jo...@herland.net wrote: When expanding shorthand refs to full ref names (e.g. in dwim_ref()), we use the ref_rev_parse_rules list of expansion patterns. This list allows origin to be expanded into refs/remotes/origin/HEAD, by using the

[PATCH 1/7] shorten_unambiguous_ref(): Allow shortening refs/remotes/origin/HEAD to origin

2013-05-04 Thread Johan Herland
When expanding shorthand refs to full ref names (e.g. in dwim_ref()), we use the ref_rev_parse_rules list of expansion patterns. This list allows origin to be expanded into refs/remotes/origin/HEAD, by using the refs/remotes/%.*s/HEAD pattern from that list. shorten_unambiguous_ref() exists to