From: Karthik Nayak Date: Mon, 29 Apr 2024 18:57:53 GMT Subject: Re: [PATCH 3/3] refs: fix segfault in `is_pseudoref()` when ref cannot be resolved Message-ID: In-Reply-To: <88822afe950318c0312de5541a411942a163b139.1714398019.git.ps@pks.im> > It is somewhat questionable in the first place that we declare a ref to > be a pseudorefe depending on whether it resolves to an object ID or not. s/pseudorefe/pseudoref [snip] Phillip Wood writes: >> via the uninitialized value when calling `is_null_oid()`, which causes >> us to segfault. >> >> It is somewhat questionable in the first place that we declare a ref to >> be a pseudorefe depending on whether it resolves to an object ID or not. > > If I remember rightly Karthik added that check to avoid the files > backend calling a file with a name that matched the pseudoref syntax a > pseudoref when it wasn't actually a pseudoref. Not sure I follow. I think it was strictly done to ensure we don't consider symrefs as pseudorefs [1]. [1]: https://lore.kernel.org/git/xmqqfrymeega.fsf@gitster.g/