{"thread":{"id":"22422","subject":"shared permissions on COMMIT_EDITMSG","startedAt":"2010-01-28T09:19:22Z","lastAt":"2010-01-28T17:57:11Z","messageCount":4,"participants":["William Pursell","Ilari Liusvaara","demerphq"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132874","messageId":"4B61569A.1010808@gmail.com","threadId":"22422","inReplyTo":null,"subject":"shared permissions on COMMIT_EDITMSG","fromName":"William Pursell","fromEmail":"bill.pursell@gmail.com","sentAt":"2010-01-28T09:19:22Z","receivedAt":"2010-01-28T09:19:22Z","isPatch":false,"sender":{"key":"bill.pursell@gmail.com","avatar":"https://gravatar.com/avatar/3ab4313e5dfdc1fedb65206d829ba33f71f56f26e11326979d1b99d5e1c403c9?d=mp&s=160"},"body":"With git-init --shared=0660 and a umask of 022,\nthe first commit to the repository creates\nthe file COMMIT_EDITMSG with mode 0644\ninstead of 0660.  I believe this is incorrect\nbehavior.  Simple fix:\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 55676fd..06ce94d 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -687,6 +687,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t}\n\n \tfclose(fp);\n+\tadjust_shared_perm(git_path(commit_editmsg));\n\n \tif (!commitable && !in_merge && !allow_empty &&\n \t    !(amend && is_a_merge(head_sha1))) {\n\n\n-- \nWilliam Pursell\n"},{"id":"132886","messageId":"20100128111425.GA29577@Knoppix","threadId":"22422","inReplyTo":"4B61569A.1010808@gmail.com","subject":"Re: shared permissions on COMMIT_EDITMSG","fromName":"Ilari Liusvaara","fromEmail":"ilari.liusvaara@elisanet.fi","sentAt":"2010-01-28T11:14:25Z","receivedAt":"2010-01-28T11:14:25Z","isPatch":false,"sender":{"key":"ilari.liusvaara@elisanet.fi","avatar":null},"body":"On Wed, Jan 27, 2010 at 11:19:22PM -1000, William Pursell wrote:\n> With git-init --shared=0660 and a umask of 022,\n> the first commit to the repository creates\n> the file COMMIT_EDITMSG with mode 0644\n> instead of 0660.  I believe this is incorrect\n> behavior.  Simple fix:\n \nCOMMIT_EDITMSG is related to committing, committing needs\nworking copy, and shared working copies don't work all too\nwell (and Git can't do anything about that because all kinds\nof stuff edits the files there, not just Git).\n\nShared repository settings are meant to override umasks\nfor files in actual repository itself.\n\n-Ilari\n"},{"id":"132898","messageId":"4B61C371.4050903@gmail.com","threadId":"22422","inReplyTo":"20100128111425.GA29577@Knoppix","subject":"Re: shared permissions on COMMIT_EDITMSG","fromName":"William Pursell","fromEmail":"bill.pursell@gmail.com","sentAt":"2010-01-28T17:03:45Z","receivedAt":"2010-01-28T17:03:45Z","isPatch":false,"sender":{"key":"bill.pursell@gmail.com","avatar":"https://gravatar.com/avatar/3ab4313e5dfdc1fedb65206d829ba33f71f56f26e11326979d1b99d5e1c403c9?d=mp&s=160"},"body":"Ilari Liusvaara wrote:\n> On Wed, Jan 27, 2010 at 11:19:22PM -1000, William Pursell wrote:\n>> With git-init --shared=0660 and a umask of 022,\n>> the first commit to the repository creates\n>> the file COMMIT_EDITMSG with mode 0644\n>> instead of 0660.  I believe this is incorrect\n>> behavior.  Simple fix:\n>  \n> COMMIT_EDITMSG is related to committing, committing needs\n> working copy, and shared working copies don't work all too\n> well (and Git can't do anything about that because all kinds\n> of stuff edits the files there, not just Git).\n> \n> Shared repository settings are meant to override umasks\n> for files in actual repository itself.\n\nFor simple work flows (eg recording linear history\nof config files), sharing a working directory\nworks okay except for COMMIT_EDITMSG.  Since\nCOMMIT_EDITMSG is in the git repository and only\nwritten by git, it makes sense for core.sharedrepository\nto be honored.\n\n-- \nWilliam Pursell\n"},{"id":"132901","messageId":"9b18b3111001280957q3806667ci88b9ec58b94d81cc@mail.gmail.com","threadId":"22422","inReplyTo":"4B61C371.4050903@gmail.com","subject":"Re: shared permissions on COMMIT_EDITMSG","fromName":"demerphq","fromEmail":"demerphq@gmail.com","sentAt":"2010-01-28T17:57:11Z","receivedAt":"2010-01-28T17:57:11Z","isPatch":false,"sender":{"key":"demerphq@gmail.com","avatar":null},"body":"2010/1/28 William Pursell <bill.pursell@gmail.com>:\n> Ilari Liusvaara wrote:\n>> On Wed, Jan 27, 2010 at 11:19:22PM -1000, William Pursell wrote:\n>>> With git-init --shared=0660 and a umask of 022,\n>>> the first commit to the repository creates\n>>> the file COMMIT_EDITMSG with mode 0644\n>>> instead of 0660.  I believe this is incorrect\n>>> behavior.  Simple fix:\n>>\n>> COMMIT_EDITMSG is related to committing, committing needs\n>> working copy, and shared working copies don't work all too\n>> well (and Git can't do anything about that because all kinds\n>> of stuff edits the files there, not just Git).\n>>\n>> Shared repository settings are meant to override umasks\n>> for files in actual repository itself.\n>\n> For simple work flows (eg recording linear history\n> of config files), sharing a working directory\n> works okay except for COMMIT_EDITMSG.  Since\n> COMMIT_EDITMSG is in the git repository and only\n> written by git, it makes sense for core.sharedrepository\n> to be honored.\n\nI agree.  And personally ive used shared working directories quite a\nbit without issue. Thanks be to git --interactive.\n\ncheers,\nYves\n\n-- \nperl -Mre=debug -e \"/just|another|perl|hacker/\"\n"}]}