public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Ramkumar Ramachandra <artagnon@gmail•com>
Cc: Git List <git@vger•kernel.org>,
	Felipe Contreras <felipe.contreras@gmail•com>
Subject: Re: [PATCH 3/4] completion: fix branch.autosetup(merge|rebase)
Date: Fri, 03 Jan 2014 11:13:28 -0800	[thread overview]
Message-ID: <xmqqa9fcnajr.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CALkWK0mGJ2V9V=KzuaAraNX-edEVBEpp-9DcAaBF-dZCqp6bsw@mail.gmail.com> (Ramkumar Ramachandra's message of "Sat, 4 Jan 2014 00:28:31 +0530")

Ramkumar Ramachandra <artagnon@gmail•com> writes:

> Junio C Hamano wrote:
>> 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.
>
> No, what's incorrect is providing completions for
>
>   $ git config branch.autosetupmerge.<TAB>
>
> when no branch called "autosetupmerge" exists.  The purpose of the
> hunk (which I now removed) was to prevent such completions, ...

Hmph, but in a repository without 'foo', I just did

	$ git config branch.foo.<TAB>
        branch.foo.merge          branch.foo.rebase         
        branch.foo.mergeoptions   branch.foo.remote         

and got offered the above. How would that removed hunk that special
cased those autosetupmerge etc. helped such case?

If it _were_ about correctness, and the definition of correctness
were that "completing branch.foo.<TAB> to offer these four variables
is wrong until refs/heads/foo materializes", the "fix" would have
checked if there already is such a branch and refused to complete
otherwise, not special case a few known names such as autosetup*.

As there is no reason to forbid setting configuration variables for
a branch 'foo' you are going to create before you actually create it
with "git branch foo", I do not necessarily agree with the above
definition of correctness, either.

So it was completely bogus hunk and it is good we noticed and
decided to remove it, I guess.

  reply	other threads:[~2014-01-03 19:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-30 14:52 [PATCH 0/4] Fix branch.autosetup(merge|rebase) completion Ramkumar Ramachandra
2013-12-30 14:52 ` [PATCH 1/4] completion: prioritize ./git-completion.bash Ramkumar Ramachandra
2013-12-30 14:52 ` [PATCH 2/4] completion: introduce __gitcomp_2 () Ramkumar Ramachandra
2014-01-02 23:47   ` Junio C Hamano
2014-01-03  7:51     ` Ramkumar Ramachandra
2014-01-03 17:49       ` Junio C Hamano
2014-01-03 19:09         ` Ramkumar Ramachandra
2013-12-30 14:52 ` [PATCH 3/4] completion: fix branch.autosetup(merge|rebase) Ramkumar Ramachandra
2014-01-02 23:56   ` Junio C Hamano
2014-01-03  7:36     ` Ramkumar Ramachandra
2014-01-03 17:32       ` Junio C Hamano
2014-01-03 18:58         ` Ramkumar Ramachandra
2014-01-03 19:13           ` Junio C Hamano [this message]
2013-12-30 14:52 ` [PATCH 4/4] completion: fix remote.pushdefault Ramkumar Ramachandra

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=xmqqa9fcnajr.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=artagnon@gmail$(echo .)com \
    --cc=felipe.contreras@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /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