{"thread":{"id":"24449","subject":"Can I enforce required approval on some files","startedAt":"2010-07-20T20:22:10Z","lastAt":"2010-07-21T07:51:22Z","messageCount":6,"participants":["Dominik Gront","Sylvain Rabot","Bruce Stephens","Jakub Narebski","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"145899","messageId":"AANLkTinQI9eBnwjzPhYHMM8XZ0ODfHJ1qiZJrNWQWUno@mail.gmail.com","threadId":"24449","inReplyTo":null,"subject":"Can I enforce required approval on some files","fromName":"Dominik Gront","fromEmail":"dgront@gmail.com","sentAt":"2010-07-20T20:22:10Z","receivedAt":"2010-07-20T20:22:10Z","isPatch":false,"sender":{"key":"dgront@gmail.com","avatar":null},"body":"Dear Group,\n\nI have been a happy SVN user for quite a long time, but now I miss\nsome functionality in Subversion. I wonder if it could be done in git.\nIf so, I convert to git right away :-)\n\nThere are some files in our repository that all their modification\nneed to be approved by a project leader.  In general the desired\nbehavior would be (examples given in svn commands) :\n- user runs \"svn ci\"\n- some files have status \"pending\" or \"waiting for approval\"\n- anyone can do \"svn up\", modifications to the pending files are not\nretrieved, project leader can get the modified versions\n- project leader accepts the changes\n- anyone running \"svn ci\" sees all the modifications\n\nBest,\nTim\n"},{"id":"145903","messageId":"80pqyhc27m.fsf@tiny.isode.net","threadId":"24449","inReplyTo":"AANLkTinQI9eBnwjzPhYHMM8XZ0ODfHJ1qiZJrNWQWUno@mail.gmail.com","subject":"Re: Can I enforce required approval on some files","fromName":"Bruce Stephens","fromEmail":"bruce.stephens@isode.com","sentAt":"2010-07-20T20:45:01Z","receivedAt":"2010-07-20T20:45:01Z","isPatch":false,"sender":{"key":"bruce.stephens@isode.com","avatar":null},"body":"Dominik Gront <dgront@gmail.com> writes:\n\n> I have been a happy SVN user for quite a long time, but now I miss\n> some functionality in Subversion. I wonder if it could be done in git.\n> If so, I convert to git right away :-)\n>\n> There are some files in our repository that all their modification\n> need to be approved by a project leader.\n\nEither have the repository owned by someone who'll do whatever checking\nyou want (which seems to be common at least amongst the public projects)\nor use hooks in a shared repository.  Specifically the update hook.\n\nThe hook can do whatever checking you deem appropriate.  At work we have\nit check the commit message for Signed-off-by names (in our context it\nreally means Reviewed-by; we use sob because that's more convenient to\nadd).  The hook could look at which files are changed or whatever else\nyou wanted.  (Notice it gets called to update a ref, and that may\ninvolve more than one commit, so be sure to check all the relevant\ncommits.)\n\n[...]\n"},{"id":"145902","messageId":"1279658706.2519.12.camel@kheops","threadId":"24449","inReplyTo":"AANLkTinQI9eBnwjzPhYHMM8XZ0ODfHJ1qiZJrNWQWUno@mail.gmail.com","subject":"Re: Can I enforce required approval on some files","fromName":"Sylvain Rabot","fromEmail":"sylvain@abstraction.fr","sentAt":"2010-07-20T20:45:07Z","receivedAt":"2010-07-20T20:45:07Z","isPatch":false,"sender":{"key":"sylvain@abstraction.fr","avatar":"https://avatars.githubusercontent.com/u/153052?v=4"},"body":"On Tue, 2010-07-20 at 13:22 -0700, Dominik Gront wrote:\n> Dear Group,\n> \n> I have been a happy SVN user for quite a long time, but now I miss\n> some functionality in Subversion. I wonder if it could be done in git.\n> If so, I convert to git right away :-)\n> \n> There are some files in our repository that all their modification\n> need to be approved by a project leader.  In general the desired\n> behavior would be (examples given in svn commands) :\n> - user runs \"svn ci\"\n> - some files have status \"pending\" or \"waiting for approval\"\n> - anyone can do \"svn up\", modifications to the pending files are not\n> retrieved, project leader can get the modified versions\n> - project leader accepts the changes\n> - anyone running \"svn ci\" sees all the modifications\n> \n> Best,\n> Tim\n\nHi,\n\nGit itself does not allow what you want but the workflow used to work\nwith git does. \n\nEach developer work and on a \"copy\" of the \"blessed\" repository (the one\nchecked out in svn, cloned in git) so it does not matter if\nmodifications done to a file need approval or not. Once the developer is\nhappy with his work he has to send his commit(s) to the person(s) in\ncharge of maintaining the project and this/those people will review the\nchanges and push (commit in svn language) them to the \"blessed\"\nrepository if they are ok with the changes made.\n\nWith git, if not used like svn, all modifications need approval.\n\nYou can read more about git's distributed workflow here :\nhttp://progit.org/book/ch5-1.html\n\nRegards.\n\n-- \nSylvain Rabot <sylvain@abstraction.fr>\n"},{"id":"145908","messageId":"m36309n75a.fsf@localhost.localdomain","threadId":"24449","inReplyTo":"AANLkTinQI9eBnwjzPhYHMM8XZ0ODfHJ1qiZJrNWQWUno@mail.gmail.com","subject":"Re: Can I enforce required approval on some files","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-07-20T22:03:24Z","receivedAt":"2010-07-20T22:03:24Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dominik Gront <dgront@gmail.com> writes:\n\n> I have been a happy SVN user for quite a long time, but now I miss\n> some functionality in Subversion. I wonder if it could be done in git.\n> If so, I convert to git right away :-)\n> \n> There are some files in our repository that all their modification\n> need to be approved by a project leader.  In general the desired\n> behavior would be (examples given in svn commands) :\n> - user runs \"svn ci\"\n> - some files have status \"pending\" or \"waiting for approval\"\n> - anyone can do \"svn up\", modifications to the pending files are not\n>   retrieved, project leader can get the modified versions\n> - project leader accepts the changes\n> - anyone running \"svn ci\" sees all the modifications\n\nBesides solution mentioned by others, namely integration repository\nwith moderator, you can also use patch/commit code review tool such as\nGerrit (http://code.google.com/p/gerrit/), equivalent of Rietveld for\nSubversion, or Mondrian for Perforce.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"145920","messageId":"AANLkTilWzSU9Uh0QT5CcauXiiBKtkG37To57s6zUxzDK@mail.gmail.com","threadId":"24449","inReplyTo":"m36309n75a.fsf@localhost.localdomain","subject":"Re: Can I enforce required approval on some files","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-07-21T00:42:46Z","receivedAt":"2010-07-21T00:42:46Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jul 20, 2010 at 22:03, Jakub Narebski <jnareb@gmail.com> wrote:\n\n> Besides solution mentioned by others, namely integration repository\n> with moderator, you can also use patch/commit code review tool such as\n> Gerrit (http://code.google.com/p/gerrit/), equivalent of Rietveld for\n> Subversion, or Mondrian for Perforce.\n\nThere's also the low-tech solution of just telling people to submit\nagain until their patches don't suck, it works for git.git, and is\nattainable when you're not doing a centralized tool.\n"},{"id":"145929","messageId":"201007210951.25150.jnareb@gmail.com","threadId":"24449","inReplyTo":"AANLkTilWzSU9Uh0QT5CcauXiiBKtkG37To57s6zUxzDK@mail.gmail.com","subject":"Re: Can I enforce required approval on some files","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-07-21T07:51:22Z","receivedAt":"2010-07-21T07:51:22Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Wed, 21 Jul 2010, Ævar Arnfjörð Bjarmason wrote:\n> On Tue, Jul 20, 2010 at 22:03, Jakub Narebski <jnareb@gmail.com> wrote:\n> \n> > Besides solution mentioned by others, namely integration repository\n> > with moderator, you can also use patch/commit code review tool such as\n> > Gerrit (http://code.google.com/p/gerrit/), equivalent of Rietveld for\n> > Subversion, or Mondrian for Perforce.\n> \n> There's also the low-tech solution of just telling people to submit\n> again until their patches don't suck, it works for git.git, and is\n> attainable when you're not doing a centralized tool.\n\nThat's what I meant by \"besides [...] integration repository with\nmoderator\", moderator who reviews patches or pull requests, and accepts\ninto integration repository or rejects them.\n\n-- \nJakub Narebski\nPoland\n"}]}