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

Re: [PATCH] remote: detect collisions in remote names

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 7, 2025, 13:59 UTC
Message-ID
<xmqqqzys5cgr.fsf@gitster.g>
In-Reply-To
<20250705185842.GA2496172@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> On Sat, Jul 05, 2025 at 12:57:50PM -0400, Jeff King wrote:
>
>> So I dunno. It feels like a configuration error in most cases, but not
>> all. I'd probably say that people touching the config manually should be
>> allowed to do what they want, but maybe "git remote" should be a bit
>> more careful about names being proper subsets of existing remotes (it
>> should already prevent the exact-match above, I'd think, because the ref
>> namespace it uses will always match the configuration name).
>
> So I'm not entirely convinced we should do anything here. The answer
> might just be "if it hurts, don't do it". But if we wanted any
> protections in the "git remote" porcelain, they might look like this:

I have firmly been in the "if it hurts..." camp. People can do weird things that may not make much sense to me, but do make sense in their workflow that may be vastly different from mine.

But I do not think of any downsides from forbidding outer and outer/inner existing at the same time, either ;-).

Thanks.
Previous: Jeff KingNext: Raymond E. Pasco
Message 17 of 18 in “Allowing "/" in the name of a git remote is a strange choice”
  1. Per CederqvistJul 3, 2025
  2. Junio C HamanoJul 4, 2025
  3. Patrick SteinhardtJul 4, 2025
  4. Lidong YanJul 4, 2025
  5. Lidong YanJul 4, 2025
  6. Junio C HamanoJul 4, 2025
  7. Per CederqvistJul 4, 2025
  8. Jeff KingJul 5, 2025
  9. remote: detect collisions in remote namesJeff King, Jul 5, 2025
  10. Patrick SteinhardtJul 7, 2025
  11. Jeff KingJul 7, 2025
  12. Junio C HamanoJul 7, 2025
  13. Jeff KingJul 8, 2025
  14. Jeff KingJul 8, 2025
  15. Junio C HamanoJul 8, 2025
  16. Jeff KingJul 9, 2025
  17. Junio C HamanoJul 7, 2025
  18. Raymond E. PascoJul 9, 2025

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.