git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott R Parish <srp@srparish.net>
To: git@vger.kernel.org
Subject: [PATCH] don't set-group-id on directories on apple
Date: Mon, 22 Oct 2007 00:55:18 -0700	[thread overview]
Message-ID: <20071022075459.GA1157@srparish.net> (raw)

"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

             reply	other threads:[~2007-10-22  7:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22  7:55 Scott R Parish [this message]
2007-10-22 14:16 ` [PATCH] don't set-group-id on directories on apple Johannes Schindelin
2007-10-22 14:29   ` Scott Parish
2007-10-23  4:30     ` Scott Parish

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=20071022075459.GA1157@srparish.net \
    --to=srp@srparish.net \
    --cc=git@vger.kernel.org \
    /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).