From: "Troels Thomsen" <troels@thomsen•io>
To: "Junio C Hamano" <gitster@pobox•com>,
"Troels Thomsen via GitGitGadget" <gitgitgadget@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] receive-pack: fix crash on out-of-namespace symref
Date: Sun, 28 Dec 2025 17:26:45 +0100 [thread overview]
Message-ID: <a16bf8a6-2f57-4794-91b5-92615f184c4b@app.fastmail.com> (raw)
In-Reply-To: <xmqqfr8uk61i.fsf@gitster.g>
On Sun, Dec 28, 2025, at 15:57, Junio C Hamano wrote:
> 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
next prev parent reply other threads:[~2025-12-28 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-27 15:40 [PATCH] receive-pack: fix crash on out-of-namespace symref Troels Thomsen via GitGitGadget
2025-12-28 14:57 ` Junio C Hamano
2025-12-28 16:26 ` Troels Thomsen [this message]
2025-12-30 0:37 ` Junio C Hamano
2026-02-21 17:00 ` Junio C Hamano
2026-02-22 7:56 ` Troels Thomsen
2026-02-22 20:35 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a16bf8a6-2f57-4794-91b5-92615f184c4b@app.fastmail.com \
--to=troels@thomsen$(echo .)io \
--cc=git@vger$(echo .)kernel.org \
--cc=gitgitgadget@gmail$(echo .)com \
--cc=gitster@pobox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox