git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>, git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jun 2013, #03; Thu, 6)
Date: Fri, 07 Jun 2013 11:41:07 -0700	[thread overview]
Message-ID: <7v8v2lu5ks.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALkWK0=D7sHLgptWkFHma1FoS-zdifHqXnuuBKhkyuszgEJ0Xw@mail.gmail.com> (Ramkumar Ramachandra's message of "Fri, 7 Jun 2013 23:00:14 +0530")

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> SZEDER Gábor wrote:
>> the one at the top because
>> of the reasons given in $gmane/226272
>
> Sorry about the delay: I went to sleep for a couple of days :P
>
>> the one at the bottom because
>> of the misleading commit message (__git_complete_file() always
>> completed refs first as part of the ref:file notation, so it worked
>> just fine except for the ref1...ref2 notation; the real reason for
>> calling __git_complete_revlist_file() for difftool is to make clear
>> that difftool takes ref1...ref2:file, too).
>
> How am I (or anyone else) supposed to know the "intended" meaning
> __git_complete_file()?

"git log -Gcomplete_file -p contrib/completion" found this one:

commit 1d66ec587e7d903afdf12a81718772a9eadc15a1
Author: SZEDER Gábor <szeder@ira.uka.de>
Date:   Thu Mar 10 19:12:29 2011 +0100

    bash: complete 'git diff ...branc<TAB>'
    
    While doing a final sanity check before merging a topic Bsomething, it
    is a good idea to review what damage Bsomething branch would make, by
    running:
    
        $ git diff ...Bsomething
    
    Unfortunately, our completion script for 'git diff' doesn't offer
    anything after '...'.  This is because 'git diff's completion function
    invokes __git_complete_file() for non-option arguments to complete the
    '<tree>:<path>' extended SHA-1 notation, but this helper function
    doesn't support refs after '...' or '..'.  Completion of refs after
    '...' or '..' is supported by the __git_complete_revlist() helper
    function, but that doesn't support '<tree>:<path>'.
    
    To support both '...<ref>' and '<tree>:<path>' notations for 'git
    diff', this patch, instead of adding yet another helper function,
    joins __git_complete_file() and __git_complete_revlist() into the new
    common function __git_complete_revlist_file().  The old helper
    functions __git_complete_file() and __git_complete_revlist() are
    changed to be a direct wrapper around the new
    __git_complete_revlist_file(), because they might be used in
    user-supplied completion scripts and we don't want to break them.
    
    This change will cause some wrong suggestions for other commands which
    use __git_complete_file() ('git diff' and friends) or
    __git_complete_revlist() ('git log' and friends), e.g. 'git diff
    ...master:Doc<TAB>' and 'git log master:Doc<TAB>' will complete the
    path to 'Documentation/', although neither commands make any sense.
    However, both of these were actively wrong to begin with as soon as
    the user entered the ':', so there is no real harm done.
    
    Suggested-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

Now I do not recall suggesting it, and you (and I today after 2
years) may disagree with the rationale, but at least we can read
what was the "intended" meaning, I think.

  reply	other threads:[~2013-06-07 18:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 22:41 What's cooking in git.git (Jun 2013, #03; Thu, 6) Junio C Hamano
2013-06-07  0:00 ` SZEDER Gábor
2013-06-07  1:05   ` Junio C Hamano
2013-06-07 15:57     ` Junio C Hamano
2013-06-07 19:34     ` SZEDER Gábor
2013-06-07 19:47       ` Ramkumar Ramachandra
2013-06-07 20:06         ` SZEDER Gábor
2013-06-07 17:30   ` Ramkumar Ramachandra
2013-06-07 18:41     ` Junio C Hamano [this message]
2013-06-07 19:01       ` Ramkumar Ramachandra
2013-06-07 19:16       ` SZEDER Gábor
2013-06-07 19:46         ` Junio C Hamano
2013-06-07 20:44           ` SZEDER Gábor
2013-06-07 21:53             ` Junio C Hamano
2013-06-08  0:11               ` SZEDER Gábor
2013-06-09 21:20                 ` Junio C Hamano
2013-06-09 21:48                   ` SZEDER Gábor
2013-06-09 22:56                     ` Junio C Hamano
2013-06-10  6:25                   ` Ramkumar Ramachandra
2013-06-10  7:00                     ` Junio C Hamano
2013-06-10  7:41                       ` Ramkumar Ramachandra
2013-06-07 18:55     ` SZEDER Gábor
2013-06-08 15:30 ` Ramkumar Ramachandra
2013-06-08 18:39   ` Matthieu Moy

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=7v8v2lu5ks.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.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).