public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha•warpmail.net>
To: Manlio Perillo <manlio.perillo@gmail•com>
Cc: Junio C Hamano <gitster@pobox•com>,
	wookietreiber <kizkizzbangbang@googlemail•com>,
	git@vger•kernel.org
Subject: Re: [feature request] git add completion should exclude staged content
Date: Mon, 28 Jan 2013 17:22:38 +0100	[thread overview]
Message-ID: <5106A5CE.3000800@drmicha.warpmail.net> (raw)
In-Reply-To: <510684FB.80104@gmail.com>

Manlio Perillo venit, vidit, dixit 28.01.2013 15:02:
> Il 28/01/2013 13:52, Michael J Gruber ha scritto:
>> Manlio Perillo venit, vidit, dixit 28.01.2013 10:26:
>>> Il 28/01/2013 00:00, Junio C Hamano ha scritto:
>>>> wookietreiber <kizkizzbangbang@googlemail•com> writes:
>>>
>>>>> I have a feature request for `git add` auto completion:
>>>>>
>> [...]
>>> For the OP: the last patch can be found in the mailing list archive,
>>> with the subject:
>>> 	[PATCH v5] git-completion.bash: add support for path completion
>>> and date:
>>> 	Fri, 11 Jan 2013 19:48:43 +0100
>>>
>>> Can you please test it?
>>>
> 
>> I haven't looked at the patch, but in the example above, untracked
>> files) could be added as well (unless you use -u), so maybe the scope
>> should depend on the option? If the new completion code kept me from
>> adding untracked files easily it wouldn't be an improvement.
> 
> 
> The patch will suggest (for git add command), all the files that are
> candidate to be added to the index file.
> 
> Please, test it and report any behaviour you think is incorrect.

OK, that seems to work and to be quite helpful.

Minor nit: "git add -u" could use the same fileset as "git commit". But
I don't know whether completion can act upon the presence of options.
Currently, it also includes untracked files (just like without -u) but
omits unmodified and ignored ones, which is already quite an improvement.

I won't be able to review the completion code but may contribute a few
lines to t/t9902-completion.sh, possibly.

Michael

  reply	other threads:[~2013-01-28 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26 17:21 [feature request] git add completion should exclude staged content wookietreiber
2013-01-27 23:00 ` Junio C Hamano
2013-01-28  9:26   ` Manlio Perillo
2013-01-28 12:52     ` Michael J Gruber
2013-01-28 14:02       ` Manlio Perillo
2013-01-28 16:22         ` Michael J Gruber [this message]
2013-01-28 17:52           ` Junio C Hamano
2013-01-28 20:16             ` Manlio Perillo
2013-01-30 14:06               ` Marc Khouzam
2013-01-30 18:24                 ` Manlio Perillo
2013-01-30 18:55                   ` Marc Khouzam
2013-01-30 19:58                     ` Manlio Perillo
2013-01-28 20:13           ` Manlio Perillo

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=5106A5CE.3000800@drmicha.warpmail.net \
    --to=git@drmicha$(echo .)warpmail.net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=kizkizzbangbang@googlemail$(echo .)com \
    --cc=manlio.perillo@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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