shared permissions on COMMIT_EDITMSG
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:
builtin-commit.c +1 -0
@@ -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))) {
Signature · 1 line
William Pursell
Quoted 5 lines · William Pursell
With git-init --shared=0660 and a umask of 022, the first commit to the repository creates the file
COMMIT_EDITMSGwith mode 0644 instead of 0660. I believe this is incorrect behavior. Simple fix:
COMMIT_EDITMSG is related to committing, committing needs working copy, and shared working copies don't work all too well (and Git can't do anything about that because all kinds of stuff edits the files there, not just Git).
Shared repository settings are meant to override umasks for files in actual repository itself.
-Ilari
Quoted 7 lines · Ilari Liusvaara
Quoted 5 lines · William Pursell
With git-init --shared=0660 and a umask of 022, the first commit to the repository creates the file
COMMIT_EDITMSGwith mode 0644 instead of 0660. I believe this is incorrect behavior. Simple fix:
Quoted 7 lines
COMMIT_EDITMSGis related to committing, committing needs working copy, and shared working copies don't work all too well (and Git can't do anything about that because all kinds of stuff edits the files there, not just Git).Shared repository settings are meant to override umasks for files in actual repository itself.
For simple work flows (eg recording linear history of config files), sharing a working directory works okay except for COMMIT_EDITMSG. Since COMMIT_EDITMSG is in the git repository and only written by git, it makes sense for core.sharedrepository to be honored.
Signature · 1 line
William Pursell
2010/1/28 William Pursell <[email protected]>:
Quoted 16 lines
Quoted 7 lines · Ilari Liusvaara
Quoted 5 lines · William Pursell
With git-init --shared=0660 and a umask of 022, the first commit to the repository creates the file
COMMIT_EDITMSGwith mode 0644 instead of 0660. I believe this is incorrect behavior. Simple fix:Quoted 7 lines
COMMIT_EDITMSGis related to committing, committing needs working copy, and shared working copies don't work all too well (and Git can't do anything about that because all kinds of stuff edits the files there, not just Git).Shared repository settings are meant to override umasks for files in actual repository itself.
Quoted 6 lines
For simple work flows (eg recording linear history of config files), sharing a working directory works okay except for
COMMIT_EDITMSG. SinceCOMMIT_EDITMSGis in the git repository and only written by git, it makes sense for core.sharedrepository to be honored.
I agree. And personally ive used shared working directories quite a bit without issue. Thanks be to git --interactive.
cheers,
Yves
Signature · 1 line
perl -Mre=debug -e "/just|another|perl|hacker/"