From: Junio C Hamano Date: Fri, 03 Jan 2014 19:13:28 GMT Subject: Re: [PATCH 3/4] completion: fix branch.autosetup(merge|rebase) Message-ID: In-Reply-To: Ramkumar Ramachandra 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. > > 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. 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. 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.