{"thread":{"id":"7168","subject":"[PATCH] Adjust reflog filemode in shared repository","startedAt":"2007-03-09T22:38:57Z","lastAt":"2007-03-10T00:53:50Z","messageCount":2,"participants":["Matthias Kestenholz","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"36695","messageId":"11734799371637-git-send-email-matthias@spinlock.ch","threadId":"7168","inReplyTo":null,"subject":"[PATCH] Adjust reflog filemode in shared repository","fromName":"Matthias Kestenholz","fromEmail":"matthias@spinlock.ch","sentAt":"2007-03-09T22:38:57Z","receivedAt":"2007-03-09T22:38:57Z","isPatch":true,"sender":{"key":"matthias@spinlock.ch","avatar":"https://gravatar.com/avatar/bc18f396e70163d09ab458a341b1decb7e8b6ee3aa2c0c954ec20162e67c4d46?d=mp&s=160"},"body":"Without this, committing in a group-shared repository would not work\neven though all developers are in the same group.\n\nSigned-off-by: Matthias Kestenholz <matthias@spinlock.ch>\n---\n refs.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex 76c08d0..9f1fb68 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -921,6 +921,8 @@ static int log_ref_write(const char *ref_name, const unsigned char *old_sha1,\n \t\t\t\t     log_file, strerror(errno));\n \t}\n \n+\tadjust_shared_perm(log_file);\n+\n \tmsglen = 0;\n \tif (msg) {\n \t\t/* clean up the message and make sure it is a single line */\n-- \n1.5.0.3.942.g299f-dirty\n"},{"id":"36705","messageId":"7vd53h3om9.fsf@assigned-by-dhcp.cox.net","threadId":"7168","inReplyTo":"11734799371637-git-send-email-matthias@spinlock.ch","subject":"Re: [PATCH] Adjust reflog filemode in shared repository","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-10T00:53:50Z","receivedAt":"2007-03-10T00:53:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, will apply to 'maint' to be included in v1.5.0.4 (and\nalso in 'master' to be in v1.5.1).\n\nWe should add tests whenever we found this kind of breakage.\nFor core.sharedrepository, we would want to have something like\nthis:\n\n (1) Initialize a repository\n (2) set core.sharedrepository\n (3) set umask to 077\n (4) perform various git operations in the repository\n (5) \"find .git\" to see if there is anything unreadable by group\n     members; if you find any, you found a bug.\n\nThat is the \"feature\" test -- check if a feature works as\nintended.\n\nAt the same time, we need to have a corresponding \"regression\"\ntest to make sure that a feature does not overstep its boundary\nand affect cases where it is not enabled:\n\n (1) Initialize a repository\n (2) unset core.sharedrepository\n (3) set umask to 077\n (4) perform various git operations in the repository\n (5) \"find .git\" to see if there is anything readable by group\n     members; if you find any, you found a bug.\n\nWe would need such \"regression\" tests for existing tests too,\nbut that is a separate issue.\n"}]}