Hi,
(please respond to my e-mail as well, not just to the list, I'm not subscribed),
I do have a problem with git 2.43.0 (ubuntu server 24.04.3) and directory modes:
I do need my git repo (owned by me) to be readable by a system user (running a rootless podman container).
I therefore set a special group for the directory, and set the sgid bit of the directory ( chgrp ... and chmod 2770 ), but when doing a git clone onto that directory, git rewrites all file modes, including the one of the root directory, and the S_ISGID is lost.
The only setting I found about file modes is core.fileMode, but git docs tell that this is for file systems that do not keep permissions correctly, such as CIFS or Windows bases file systems, not for keeping git from changing.
The only way I found is to define a hook to correctly set modes after git pull.
Is there a way to keep git from destroying group permission and S_ISGID?
If not: Proposal to set a bit mask with file mode flags git shouldn't touch?
regards
Hadmut