From: "Bert Wesarg" <bert.wesarg@googlemail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org, szeder@ira.uka.de,
"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH v4] for-each-ref: `:short` format for `refname`
Date: Tue, 9 Sep 2008 10:57:42 +0200 [thread overview]
Message-ID: <36ca99e90809090157m64253b89p6adf6a49b6d62e99@mail.gmail.com> (raw)
In-Reply-To: <7vod2xagmr.fsf@gitster.siamese.dyndns.org>
On Tue, Sep 9, 2008 at 10:05, Junio C Hamano <gitster@pobox.com> wrote:
> "Bert Wesarg" <bert.wesarg@googlemail.com> writes:
>
>> Any opinions, whether we want the 'strict' mode? i.e.:
>>
>> for refs/heads/xyzzy and refs/tags/xyzzy:
>>
>> loose mode (current implementation):
>>
>> refs/heads/xyzzy => heads/xyzzy
>> refs/tags/xyzzy => xyzzy
>>
>> there would be a ambiguous warning (if enabled) if you use xyzzy as a
>> tag, but it resolves correctly to the tag.
>>
>> strict mode:
>>
>> refs/heads/xyzzy => heads/xyzzy
>> refs/tags/xyzzy => tags/xyzzy
>>
>> will always produce a non-ambiguous short forms.
>
> I have no strong opinions either way, but if we want to pick only one, I
> suspect that the loose mode would be more appropriate for bash completion
> purposes exactly because:
>
> (1) the shorter form would match the users' expectations, and;
>
> (2) if it triggers ambiguity warning to use that result that matches
> users' expectations, it is a *good thing* --- it reminds the user
> that s/he is playing with fire _if_ the user is of careful type who
> enables the ambiguity warning.
>
> Thinking about it from a different angle, it would make more sense to use
> loose mode if the user does not have ambiguity warning configured, and use
> strict mode if the warning is enabled. Then people who will get warnings
> from ambiguity will not get an ambiguous completion, and people who won't
> will get shorter but still unambiguous completion.
>
> Which means, despite what I said earlier, now I have a mild preference to
> tie the choice to core.wawrnambigousrefs configuration.
A really nice idea. Await PATCH v5. I had to change my plans for
today, unfortunately.
Bert
>
prev parent reply other threads:[~2008-09-09 8:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7vprnpbqmo.fsf@gitster.siamese.dyndns.org>
2008-08-31 12:41 ` [PATCH] for-each-ref: `:short` format for `refname` Bert Wesarg
2008-09-01 13:15 ` SZEDER Gábor
2008-09-01 14:13 ` Bert Wesarg
2008-09-01 17:52 ` Bert Wesarg
2008-09-01 19:10 ` Shawn O. Pearce
2008-09-01 21:10 ` Bert Wesarg
2008-09-01 21:28 ` Junio C Hamano
2008-09-01 21:44 ` Bert Wesarg
2008-09-02 7:26 ` Bert Wesarg
2008-09-02 14:39 ` Shawn O. Pearce
2008-09-02 21:57 ` [PATCH v2] " Bert Wesarg
2008-09-02 23:10 ` Junio C Hamano
2008-09-03 8:33 ` Bert Wesarg
2008-09-03 8:42 ` [PATCH v3] " Bert Wesarg
2008-09-03 15:18 ` Shawn O. Pearce
2008-09-03 16:33 ` Bert Wesarg
2008-09-03 16:56 ` Bert Wesarg
2008-09-03 18:36 ` Junio C Hamano
2008-09-05 21:16 ` [PATCH v4] " Bert Wesarg
2008-09-05 22:20 ` Junio C Hamano
2008-09-06 18:16 ` Bert Wesarg
2008-09-08 22:57 ` Junio C Hamano
2008-09-08 23:04 ` Shawn O. Pearce
2008-09-09 6:52 ` Bert Wesarg
2008-09-09 8:05 ` Junio C Hamano
2008-09-09 8:57 ` Bert Wesarg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36ca99e90809090157m64253b89p6adf6a49b6d62e99@mail.gmail.com \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.org \
--cc=szeder@ira.uka.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).