Subject: shared permissions on COMMIT_EDITMSG

From: William Pursell <[email-masked]>
Date: Wed, 27 Jan 2010 23:19:22 -1000

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