git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Scott R Parish <srp@srparish.net>
Date
Oct 22, 2007, 07:55 UTC
Message-ID
<20071022075459.GA1157@srparish.net>

"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
Next: Johannes Schindelin
Message 1 of 4 in “don't set-group-id on directories on apple”
  1. don't set-group-id on directories on appleScott R Parish, Oct 22, 2007
  2. Johannes SchindelinOct 22, 2007
  3. Scott ParishOct 22, 2007
  4. Scott ParishOct 23, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.