git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Michael Orlitzky <michael@orlitzky.com>
Cc: Caleb White <cdwhite3@pm.me>, git@vger.kernel.org
Subject: Re: safe.directory warnings for root-owned repositories
Date: Thu, 31 Oct 2024 16:04:51 -0400	[thread overview]
Message-ID: <ZyPi4xdGPwfa9+ez@nand.local> (raw)
In-Reply-To: <ZyN03D8os53XJGDo@mertle>

On Thu, Oct 31, 2024 at 08:15:24AM -0400, Michael Orlitzky wrote:
> On 2024-10-31 05:38:00, Caleb White wrote:
> >
> > The dubious ownership check simply reports that the directory is owned by
> > someone other than the user running the command, with no special handling
> > for the root user. While the error might not make the most sense in this
> > context, I'm not sure that it's worth special-casing the root user
> > (really the user with id = 0 as it might not be named `root`) in the
> > implementation.
> >
> > Why would you initialize a repository as `root` in the first place?
>
> To avoid the dubious ownership warning, obviously :)

If you want to avoid the warning entirely, you can set 'safe.directory'
to "*" at the global level, and that will opt-out of the check entirely.

Of course, you should consult that portion of the git-config(1) manual
page to understand the implications of doing so, but it is something
that Git supports doing.

Thanks,
Taylor

      reply	other threads:[~2024-10-31 20:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31  4:23 safe.directory warnings for root-owned repositories Michael Orlitzky
2024-10-31  5:38 ` Caleb White
2024-10-31 12:15   ` Michael Orlitzky
2024-10-31 20:04     ` Taylor Blau [this message]

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=ZyPi4xdGPwfa9+ez@nand.local \
    --to=me@ttaylorr.com \
    --cc=cdwhite3@pm.me \
    --cc=git@vger.kernel.org \
    --cc=michael@orlitzky.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).