Re: [RFD] minor frustration in 'git add' pathname completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Beller <sbeller@xxxxxxxxxx> 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").


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]