Subject: Re: [PATCH v5 2/4] git-compat-util: avoid failing dir ownership checks if running privileged

From: SZEDER Gábor <[email-masked]>
Date: Fri, 3 Jun 2022 19:34:27 +0200

On Fri, Jun 03, 2022 at 09:54:34AM -0700, Junio C Hamano wrote:
> SZEDER Gábor <[email-masked]> writes:
> 
> > Unfortunately, I haven't been able to follow the discussion on this
> > patch series at all, but by a cursory look now I didn't notice any
> > discussion about what should happen if someone were to use 'sudo' to
> > access a repository owned by root.  I think it should work, and it did
> > in fact work in the past, even after bdc77d1d685, but this patch
> > broke it.
> 
> I thought 4/4 of the series was meant to discuss that?  Right now it
> is split out as Carlo was hesitant to push the step forward?
> 
> https://lore.kernel.org/git/[email-masked]/
> 

Oh, indeed.  I only looked through my mailbox, not the ML archives,
and I wasn't on Cc for the last two patches of the series.  Thanks for
pointing it out.

I think we do need that additional fix as well, because we now break
at least one tool built around Git.

Though looking at patch 4/4, I'm not so keen about restructuring the
extract_id_from_env() helper function into id_from_env_matches(),
because I'd prefer to have a helper function for ID extraction and
nothing else, and to have all the uid matching inside one function.