It does not allow changing the bit to a non-root user. This fixes t1301-shared-repo.sh on the platform. Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx> --- Junio C Hamano, Tue, Mar 04, 2008 09:08:24 +0100: > Alex Riesen <raa.lkml@xxxxxxxxx> writes: > > > It is a directory. The bit 02000 is S_ISGID on FreeBSD too. It just > > does not work (now I am just observing, no coding). > > IIRC, g+s on directory to make group ownership inherited was a SysVism; > BSD did not need that as it did the sane thing by default without g+s. > > Perhaps we should make it conditional. > Perhaps like this (FreeBSD 4 and older). Can someone try the change on the later versions? path.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/path.c b/path.c index af27161..6f09ba2 100644 --- a/path.c +++ b/path.c @@ -282,8 +282,10 @@ int adjust_shared_perm(const char *path) : (shared_repository == PERM_EVERYBODY ? (S_IXGRP|S_IXOTH) : 0)); +#if !defined(__FreeBSD__) || (__FreeBSD__ > 4) if (S_ISDIR(mode)) mode |= S_ISGID; +#endif if ((mode & st.st_mode) != mode && chmod(path, mode) < 0) return -2; return 0; -- 1.5.4.3.469.gf84e2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html