All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Pursell <bill.pursell@gmail.com>
To: git@vger.kernel.org
Subject: shared permissions on COMMIT_EDITMSG
Date: Wed, 27 Jan 2010 23:19:22 -1000	[thread overview]
Message-ID: <4B61569A.1010808@gmail.com> (raw)

With git-init --shared=0660 and a umask of 022,
the first commit to the repository creates
the file COMMIT_EDITMSG with mode 0644
instead of 0660.  I believe this is incorrect
behavior.  Simple fix:

diff --git a/builtin-commit.c b/builtin-commit.c
index 55676fd..06ce94d 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -687,6 +687,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
 	}

 	fclose(fp);
+	adjust_shared_perm(git_path(commit_editmsg));

 	if (!commitable && !in_merge && !allow_empty &&
 	    !(amend && is_a_merge(head_sha1))) {


-- 
William Pursell

             reply	other threads:[~2010-01-28  9:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28  9:19 William Pursell [this message]
2010-01-28 11:14 ` shared permissions on COMMIT_EDITMSG Ilari Liusvaara
2010-01-28 17:03   ` William Pursell
2010-01-28 17:57     ` demerphq

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=4B61569A.1010808@gmail.com \
    --to=bill.pursell@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.