From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [RFD] minor frustration in 'git add' pathname completion
Date: Thu, 24 Mar 2016 15:55:40 -0700 [thread overview]
Message-ID: <xmqqy4975vv7.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAGZ79kYDWJDDJ+doy3NcZH_dqbbFE8U2UHZjnYYTo5R9GTsghQ@mail.gmail.com> (Stefan Beller's message of "Thu, 24 Mar 2016 15:40:19 -0700")
Stefan Beller <sbeller@google.com> writes:
>> If I were to explicitly ignore that file, then even though I know
>> whats-cooking.txt is not ignored,
>>
>> $ git add whats-coo<HT>
>>
>> would not offer anything. I'd be left scratching my head, wondering
>> if I mistyped the early part of the filename (e.g. "wahts-coo<HT>"?).
>
> Well, git add cannot do anything with either of the files, so why would
> it offer to complete to one of them?
>
> In an ideal world it would tell you whats-cooking.txt doesn't need
> adding and whats-cooking.txt+ is ignored locally so excluded from
> being added.
Exactly my point that you omitted from your quoting ;-)
Because the completion cannot give such an explanation, the
behaviour gives an unnecessary confusion to the user. If it offered
whats-cooking.txt as a candidate, at least the behaviour would make
sense to the user. "Doesn't need adding" is quite different from
"must not be added". In other words, "git add A && git add A" does
not hurt, but "git add A~" would because the latter would only makes
you see unnecessary error message ("You need -f if you really mean
it").
next prev parent reply other threads:[~2016-03-24 22:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 21:44 [RFD] minor frustration in 'git add' pathname completion Junio C Hamano
2016-03-24 21:56 ` Stefan Beller
2016-03-24 22:06 ` Junio C Hamano
2016-03-24 22:27 ` Junio C Hamano
2016-03-24 22:40 ` Stefan Beller
2016-03-24 22:55 ` Junio C Hamano [this message]
2016-03-25 0:38 ` Jacob Keller
2016-03-24 22:29 ` Junio C Hamano
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=xmqqy4975vv7.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sbeller@google.com \
/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.