From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH v2] specifying ranges: we did not mean to make ".." an empty set
Date: Wed, 04 May 2011 08:55:01 +0200 [thread overview]
Message-ID: <4DC0F845.2080903@drmicha.warpmail.net> (raw)
In-Reply-To: <7vvcxrit07.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 03.05.2011 19:38:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
>
>>>> Helped-by: Jeff King <peff@peff.net>
>>>> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>>>
>>> Looks good to me.
>>
>> I'm sorry but I don't like this at all, because:
>>
>>> Doing "..." is still allowed, but will never produce any useful results.
>>> I don't know if it is worth disallowing it to catch errors. I am tempted
>>> to say it should be magic for "@{u}...HEAD", but I think just "..." is
>>> getting unreadably magical. "@{u}...HEAD" is already pretty concise and
>>> is much more readable.
>>
>> We need to disambiguate any pathspec with "--" which could be a revision
>> parameter. Therefore I find it very unnatural to disambiguate ".." to a
>> pathspec automatically (and have "..." error out). "../" is really
>> simple enough to type.
>
> If you are comfortable typing "../", why do you even care? It would be a
I care about:
- sane defaults
- sane arguments
> different story if the patch made ".." error out and forbade to be used as
> an empty range even when you disambiguated, i.e. "git log .. --", but that
> is not what we are doing.
>
> And we do not even special case "...". Between the two potential requests
> of asking for an empty revision range and asking for a pathspec "...", both
> are just as unlikely.
>
> Contrast that with ".." and realize that is very different. It is
> infinitely more likely that the user meant the immediate parent directory
> than an empty revision range.
and that is a straw man argument. I suggested "@{u}..HEAD" for "..",
because I consider that much more useful. "Infinitely more likely" is
obviously true and obviously pointless when you compare with something
of zero likelihood (and nonsense otherwise). I have no problem accepting
a majority vote or sane arguments, but not something like this, sorry.
Michael
next prev parent reply other threads:[~2011-05-04 6:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 19:15 [Annoyance] "git log .." thinks ".." is ambiguous Junio C Hamano
2011-05-02 19:33 ` Jeff King
2011-05-02 19:36 ` Jeff King
2011-05-02 20:36 ` Junio C Hamano
2011-05-02 20:42 ` Jeff King
2011-05-02 20:56 ` [PATCH v2] specifying ranges: we did not mean to make ".." an empty set Junio C Hamano
2011-05-02 21:01 ` Jeff King
2011-05-02 21:48 ` Junio C Hamano
2011-05-03 6:39 ` Michael J Gruber
2011-05-03 17:38 ` Junio C Hamano
2011-05-04 6:55 ` Michael J Gruber [this message]
2011-05-04 15:36 ` Junio C Hamano
2011-05-04 18:00 ` Junio C Hamano
2011-05-03 1:57 ` [Annoyance] "git log .." thinks ".." is ambiguous Joshua Juran
2011-05-03 6:33 ` Michael J Gruber
2011-05-03 8:17 ` Joshua Juran
2011-05-03 8:45 ` Michael J Gruber
2011-05-03 19:00 ` Junio C Hamano
2011-05-03 8:38 ` John Szakmeister
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=4DC0F845.2080903@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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 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.