Re: [PATCH 3/4] completion: fix branch.autosetup(merge|rebase)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 3, 2014, 17:32 UTC
- Message-ID
- <xmqq1u0pnf7b.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CALkWK0=tL4K7UHDBp_jGz5zUaHE9m=OESo2=2a0fUZwXB4auGg@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 28 quoted lines
> Junio C Hamano wrote:
>> If we are looking at "branch.autosetupmerge." followed by something,
>> who typed that final dot?
>
> I admit that it's a very unlikely case. The user did:
>
> $ branch.autosetupmer<TAB>
>
> hit backspace to delete the trailing space, inserted a dot, and hit <TAB> again.
>
>> If you are working on a topic about
>> auto-setup-merge and named your branch "autosetupmerge", don't you
>> want to be able to configure various aspect of that branch via
>> branch.autosetupmerge.{remote,merge} etc., just like you can do so
>> for your "topic" branch via branch.topic.{remote,merge} etc.,
>> regardless of your use of "autosetupmerge" option across branches?
>
> My reasoning was that being correct was more important that being
> complete. So, if by some horrible chance, the user names her branch
> "autosetupmerge", we don't aid her in completions.
>
>> Besides, it smells fishy to me that you need to enumerate and
>> special case these two here, and then you have to repeat them below
>> in a separate case arm.
>
> I'm not too irked about correctness in this odd case; seeing that you
> aren't either, I'll resubmit the series without this hunk (+ the hunk
> in remote.pushdefault).You seem to be calling it "incorrect" to give the same degree of completion for a branch the user named "autosetupmerge" as another branch "topic", but I think it is incorrect not to, so I cannot tell if we are agreeing or disagreeing.
Puzzled...