[PATCH] don't set-group-id on directories on apple

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Monday, October 22, 2007 - 3:55 am

"git init --shared=all" was failing because chmod was returning
EPERM. According to the man page, the set-group-id behavior is
already default: man 2 mkdir:

  The directory's group ID is set to that of the parent directory
  in which it is created.

Signed-off-by: Scott R Parish <srp@srparish.net>
---
 path.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/path.c b/path.c
index 4260952..4089753 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(__APPLE__)
 	if (S_ISDIR(mode))
 		mode |= S_ISGID;
+#endif
 	if ((mode & st.st_mode) != mode && chmod(path, mode) < 0)
 		return -2;
 	return 0;
-- 
1.5.3.4.209.g5d1ce-dirty


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] don't set-group-id on directories on apple, Scott R Parish, (Mon Oct 22, 3:55 am)
Re: [PATCH] don't set-group-id on directories on apple, Johannes Schindelin, (Mon Oct 22, 10:16 am)
Re: [PATCH] don't set-group-id on directories on apple, Scott Parish, (Mon Oct 22, 10:29 am)
Re: [PATCH] don't set-group-id on directories on apple, Scott Parish, (Tue Oct 23, 12:30 am)