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

shared permissions on COMMIT_EDITMSG

From
William Pursell <bill.pursell@gmail.com>
Date
Jan 28, 2010, 09:19 UTC
Message-ID
<4B61569A.1010808@gmail.com>

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
Next: Ilari Liusvaara
Message 1 of 4 in “shared permissions on COMMIT_EDITMSG”
  1. William PursellJan 28, 2010
  2. Ilari LiusvaaraJan 28, 2010
  3. William PursellJan 28, 2010
  4. demerphqJan 28, 2010

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.