git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/4] completion: fix branch.autosetup(merge|rebase)

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 3, 2014, 19:13 UTC
Message-ID
<xmqqa9fcnajr.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CALkWK0mGJ2V9V=KzuaAraNX-edEVBEpp-9DcAaBF-dZCqp6bsw@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 12 quoted lines
> 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.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 13 of 14 in “Fix branch.autosetup(merge|rebase) completion”
  1. 0/4 Fix branch.autosetup(merge|rebase) completionRamkumar Ramachandra, Dec 30, 2013
  2. 1/4 completion: prioritize ./git-completion.bashRamkumar Ramachandra, Dec 30, 2013
  3. 2/4 completion: introduce __gitcomp_2 ()Ramkumar Ramachandra, Dec 30, 2013
  4. Junio C HamanoJan 2, 2014
  5. Ramkumar RamachandraJan 3, 2014
  6. Junio C HamanoJan 3, 2014
  7. Ramkumar RamachandraJan 3, 2014
  8. 3/4 completion: fix branch.autosetup(merge|rebase)Ramkumar Ramachandra, Dec 30, 2013
  9. Junio C HamanoJan 2, 2014
  10. Ramkumar RamachandraJan 3, 2014
  11. Junio C HamanoJan 3, 2014
  12. Ramkumar RamachandraJan 3, 2014
  13. Junio C HamanoJan 3, 2014
  14. 4/4 completion: fix remote.pushdefaultRamkumar Ramachandra, Dec 30, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.