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

Re: [PATCH 2/2] remote.c: reject 0-length branch names

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 1, 2022, 21:21 UTC
Message-ID
<xmqqzgiwozam.fsf@gitster.g>
In-Reply-To
<kl6lilpke31e.fsf@chooglen-macbookpro.roam.corp.google.com>
Glen Choo <chooglen@google.com> writes:
Show 5 quoted lines
> It truly makes no sense because `branch..remote` fits the schema of
> `branch.<name>.remote` where <name> is "", but "" isn't a valid branch
> name (and it never has been AFAIK). So such a key would never be useful
> to Git, and it would be extremely hacky for a non-Git tool to use such
> a key.

Yup, we might want to reserve a bogus key or two that can never be a branch name to allow us express "this configuration is in effect for all branches" (e.g. "branch.*.rebase = never"), but the natural such name would be "*" and does not have to be an empty string.

Previous: Glen ChooNext: Jeff King
Message 7 of 8 in “remote.c: reject 0-length branch names”
  1. 0/2 remote.c: reject 0-length branch namesGlen Choo via GitGitGadget, May 31, 2022
  2. 1/2 remote.c: don't BUG() on 0-length branch namesGlen Choo via GitGitGadget, May 31, 2022
  3. Jeff KingJun 8, 2022
  4. 2/2 remote.c: reject 0-length branch namesGlen Choo via GitGitGadget, May 31, 2022
  5. Ævar Arnfjörð BjarmasonJun 1, 2022
  6. Glen ChooJun 1, 2022
  7. Junio C HamanoJun 1, 2022
  8. Jeff KingJun 8, 2022

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.