{"thread":{"id":"41037","subject":"git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo","startedAt":"2015-12-18T19:55:03Z","lastAt":"2015-12-19T18:24:12Z","messageCount":5,"participants":["Yaroslav Halchenko","Johannes Schindelin","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"274726","messageId":"20151218195503.GA4554@onerussian.com","threadId":"41037","inReplyTo":null,"subject":"git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo","fromName":"Yaroslav Halchenko","fromEmail":"yoh@onerussian.com","sentAt":"2015-12-18T19:55:03Z","receivedAt":"2015-12-18T19:55:03Z","isPatch":false,"sender":{"key":"yoh@onerussian.com","avatar":"https://gravatar.com/avatar/8901b82415ae451a83aea49409708912726e53620e3ac92320bf1f86548d97e9?d=mp&s=160"},"body":"Not sure for what batch operations that file is actually useful, but the\nstory is that if we have a shared git repo (I know -- might not be as\ncommon of a situation but possible and allowed to happen), then if one\nfrom the shared group commits within that repository, it becomes\nimpossible for another person to commit.  \n\ngit does take care about chmod'ing all the files under .git/objects etc\nfor --shared operation, but leaves .git/COMMIT_EDITMSG at the\nmercy of user's umask.  IMHO correct resolution, if leaving that file\nbehind is necessary, is to chmod it in the same fashion as any other\ninternal .git file in --shared mode -- with group write permission.\n\nI have reproduced that behavior with today's version of git as of\n2.7.0.rc1.5.gf3adf45.\n\n-- \nYaroslav O. Halchenko\nCenter for Open Neuroscience     http://centerforopenneuroscience.org\nDartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755\nPhone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419\nWWW:   http://www.linkedin.com/in/yarik        \n"},{"id":"274754","messageId":"alpine.DEB.2.20.1512191137450.6483@virtualbox","threadId":"41037","inReplyTo":"20151218195503.GA4554@onerussian.com","subject":"Re: git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-12-19T10:40:43Z","receivedAt":"2015-12-19T10:40:43Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Yaroslav,\n\nOn Fri, 18 Dec 2015, Yaroslav Halchenko wrote:\n\n> Not sure for what batch operations that file is actually useful,\n\nNone. This file is written when you commit interactively. It is deleted\nafterwards, unless aborted in a fatal manner.\n\nSo I would try to find out who the heck is working interactively without\nfinishing their commit message in that shared directory.\n\nCiao,\nJohannes\n"},{"id":"274757","messageId":"1450528804-669-1-git-send-email-szeder@ira.uka.de","threadId":"41037","inReplyTo":"alpine.DEB.2.20.1512191137450.6483@virtualbox","subject":"Re: git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2015-12-19T12:40:04Z","receivedAt":"2015-12-19T12:40:04Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"> On Fri, 18 Dec 2015, Yaroslav Halchenko wrote:\n> \n> > Not sure for what batch operations that file is actually useful,\n> \n> None. This file is written when you commit interactively. It is deleted\n> afterwards, unless aborted in a fatal manner.\n\nIs it?  I have a COMMIT_EDITMSG lying around in just about every git\nrepository I have and couldn't find any unlink() in builtin/commit.c\nor elsewhere that would remove it.  In fact, not deleting it seems to\nbe the desired bahavior, because many tests in t7502-commit.sh depend\non this file still being present after a successful 'git commit'.\n\nGábor\n"},{"id":"274758","messageId":"1CDB6F0D-B48B-473D-A043-0AA38A808B43@onerussian.com","threadId":"41037","inReplyTo":"alpine.DEB.2.20.1512191137450.6483@virtualbox","subject":"Re: git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo","fromName":"Yaroslav Halchenko","fromEmail":"yoh@onerussian.com","sentAt":"2015-12-19T15:01:20Z","receivedAt":"2015-12-19T15:01:20Z","isPatch":false,"sender":{"key":"yoh@onerussian.com","avatar":"https://gravatar.com/avatar/8901b82415ae451a83aea49409708912726e53620e3ac92320bf1f86548d97e9?d=mp&s=160"},"body":"fwiw that file is created not only by interactive tasks by with a regular commit -m msg as well.\n\nOn December 19, 2015 5:40:43 AM EST, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>Hi Yaroslav,\n>\n>On Fri, 18 Dec 2015, Yaroslav Halchenko wrote:\n>\n>> Not sure for what batch operations that file is actually useful,\n>\n>None. This file is written when you commit interactively. It is deleted\n>afterwards, unless aborted in a fatal manner.\n>\n>So I would try to find out who the heck is working interactively\n>without\n>finishing their commit message in that shared directory.\n>\n>Ciao,\n>Johannes\n\n-- \nSent from a phone which beats iPhone.\n"},{"id":"274762","messageId":"alpine.DEB.2.20.1512191923220.6483@virtualbox","threadId":"41037","inReplyTo":"1450528804-669-1-git-send-email-szeder@ira.uka.de","subject":"Re: git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-12-19T18:24:12Z","receivedAt":"2015-12-19T18:24:12Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Gábor,\n\nOn Sat, 19 Dec 2015, SZEDER Gábor wrote:\n\n> > On Fri, 18 Dec 2015, Yaroslav Halchenko wrote:\n> > \n> > > Not sure for what batch operations that file is actually useful,\n> > \n> > None. This file is written when you commit interactively. It is deleted\n> > afterwards, unless aborted in a fatal manner.\n> \n> Is it?  I have a COMMIT_EDITMSG lying around in just about every git\n> repository I have and couldn't find any unlink() in builtin/commit.c\n> or elsewhere that would remove it.\n\nOops. My mistake. Patch sent.\n\nCiao,\nDscho"}]}