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

Re: [PATCH] receive-pack: fix crash on out-of-namespace symref

From
Troels Thomsen <troels@thomsen.io>
Date
Dec 28, 2025, 16:26 UTC
Message-ID
<a16bf8a6-2f57-4794-91b5-92615f184c4b@app.fastmail.com>
In-Reply-To
<xmqqfr8uk61i.fsf@gitster.g>
On Sun, Dec 28, 2025, at 15:57, Junio C Hamano wrote:
Show 13 quoted lines
> Fixing crash is certainly a good thing, but when the namespace is
> segregated and receive-pack wants to get updates only within the
> given namespace, would presence of such a cross namespace symref
> cause updates outside the namespace through the symref, defeating
> the point of setting up a namespace in the first place?
>
> I am not objecting to the new behaviour, but am not sure if it is a
> sensible one.  You _might_ be able to argue that an attempt to update
> underlying refs outside the namespace through such a symbolic ref
> should result in an error (i.e., a fix to the current crashing
> behaviour is to die in a controlled way).
>
> Thoughts?

I think it's important that the symbolic ref needs to be explicitly created on the receiving side.

An argument in favor of allowing updates is that you can still choose to reject them by implementing an update hook. Would the opposite be true? I explictly wanted to share a branch into a namespace and update it from there.

I suppose the behavior could be configurable. Given this bug has existed since 2016, I'm assuming namespaces and symbolic refs probably aren't used in combination frequently enough to justify this over using a hook.

-- 
Troels Thomsen
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “receive-pack: fix crash on out-of-namespace symref”
  1. receive-pack: fix crash on out-of-namespace symrefTroels Thomsen via GitGitGadget, Dec 27, 2025
  2. Junio C HamanoDec 28, 2025
  3. Troels ThomsenDec 28, 2025
  4. Junio C HamanoDec 30, 2025
  5. Junio C HamanoFeb 21, 2026
  6. Troels ThomsenFeb 22, 2026
  7. Junio C HamanoFeb 22, 2026

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.