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

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

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jan 3, 2014, 07:36 UTC
Message-ID
<CALkWK0=tL4K7UHDBp_jGz5zUaHE9m=OESo2=2a0fUZwXB4auGg@mail.gmail.com>
In-Reply-To
<xmqqa9fendj3.fsf@gitster.dls.corp.google.com>
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.
Show 6 quoted lines
> 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).

Previous: Junio C HamanoNext: Junio C Hamano
Message 10 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.