From: "Torsten Bögershausen" <tboegi@web.de>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
K_V <zinen2@gmail.com>,
git@vger.kernel.org
Subject: Re: git gc changes ownerships of files linux
Date: Sun, 11 Feb 2024 16:43:45 +0100 [thread overview]
Message-ID: <20240211154345.GA28699@tb-raspi4> (raw)
In-Reply-To: <ZcjnuSAZiNHvA5h1@tapette.crustytoothpaste.net>
On Sun, Feb 11, 2024 at 03:28:57PM +0000, brian m. carlson wrote:
> On 2024-02-11 at 15:14:55, Torsten Bögershausen wrote:
> > Thanks for reporting this -
> > I think that you have a working workaround ?
> >
> > However, Git has a feature called "shared repository".
> > You need to define a (unix) group that is shared between
> > your user(s) and the ansible user.
> >
> > The basic trick is to do
> > git config core.sharedRepository true
> >
> > (And then change the ownership of all files/directories to the new group)
>
> On Linux, you also should set each directory to be setgid. That's
> because by default, Linux uses the user's current group ID as the group
> to create new directories. However, you'll want the group to be
> inherited from the parent directory, which is the behaviour when the
> parent directory is setgid.
>
> This behaviour is the default on the BSDs, and no such configuration is
> required there.
Briam, Hm, I wonder what this function (in path.c) does:
int adjust_shared_perm(const char *path)
According to my understanding, it was included into the Git codebase
to work around the missing "setgid" feature in Linux (and probably cygwin).
And then we have t/t1301-shared-repo.sh,
so I think we are in a good shape: for all systems that have posix permissions.
and do not overwrite them with facl or other features.
next prev parent reply other threads:[~2024-02-11 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-10 19:52 git gc changes ownerships of files linux K_V
2024-02-11 15:14 ` Torsten Bögershausen
2024-02-11 15:28 ` brian m. carlson
2024-02-11 15:43 ` Torsten Bögershausen [this message]
2024-02-11 16:43 ` Junio C Hamano
2024-02-11 16:59 ` Torsten Bögershausen
2024-02-11 19:09 ` brian m. carlson
2024-02-11 19:48 ` rsbecker
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=20240211154345.GA28699@tb-raspi4 \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
--cc=zinen2@gmail.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).