{"thread":{"id":"15849","subject":"merge hook","startedAt":"2008-10-10T07:21:48Z","lastAt":"2008-10-10T12:30:03Z","messageCount":4,"participants":["Erik Colson","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92731","messageId":"20081010072148.GB303@Mac2.local","threadId":"15849","inReplyTo":null,"subject":"merge hook","fromName":"Erik Colson","fromEmail":"eco@ecocode.net","sentAt":"2008-10-10T07:21:48Z","receivedAt":"2008-10-10T07:21:48Z","isPatch":false,"sender":{"key":"eco@ecocode.net","avatar":"https://gravatar.com/avatar/49c3fa7fa68eb4dc97ad0bcf6ca1bafb4bba97d03d9553830b5cf27adcf43539?d=mp&s=160"},"body":"Hello,\n\nIs it possible to launch a custom script on all files involved in a\nmerge to master ? \nIf yes, is it then also possible to reject the merge if the script\nreturns an error ?\n\nThanks\n--\nErik\n"},{"id":"92740","messageId":"alpine.DEB.1.00.0810101204540.22125@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"15849","inReplyTo":"20081010072148.GB303@Mac2.local","subject":"Re: merge hook","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-10-10T10:07:16Z","receivedAt":"2008-10-10T10:07:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 10 Oct 2008, Erik Colson wrote:\n\n> Is it possible to launch a custom script on all files involved in a \n> merge to master ? If yes, is it then also possible to reject the merge \n> if the script returns an error ?\n\n>From Documentation/githooks.txt:\n\n-- snip --\nprepare-commit-msg\n------------------\n\nThis hook is invoked by 'git-commit' right after preparing the\ndefault log message, and before the editor is started.\n\nIt takes one to three parameters.  The first is the name of the file that \nthe commit log message.  The second is the source of the commit message, \nand can be: [...] `merge` (if the commit is a merge or a `.git/MERGE_MSG` \nfile exists); [...]\n\nIf the exit status is non-zero, 'git-commit' will abort.\n-- snap --\n\nTo see which files are affected, you'd just need to ask \"git diff \n--name-only --cached\".\n\nI guess that you want to disallow merging in changes from people who \nchanged files that are none of their business?  If so, it would be nice to \ncontribute the hook as a patch to contrib/.\n\nCiao,\nDscho\n"},{"id":"92741","messageId":"20081010102603.GC303@Mac2.local","threadId":"15849","inReplyTo":"alpine.DEB.1.00.0810101204540.22125@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: merge hook","fromName":"Erik Colson","fromEmail":"eco@ecocode.net","sentAt":"2008-10-10T10:26:03Z","receivedAt":"2008-10-10T10:26:03Z","isPatch":false,"sender":{"key":"eco@ecocode.net","avatar":"https://gravatar.com/avatar/49c3fa7fa68eb4dc97ad0bcf6ca1bafb4bba97d03d9553830b5cf27adcf43539?d=mp&s=160"},"body":"On Fri, Oct 10, 2008 at 12:07:16PM +0200, Johannes Schindelin wrote:\n\n[..]\n\n> From Documentation/githooks.txt:\n\nthank you for pointing me there\n\n[..]\n\n> I guess that you want to disallow merging in changes from people who \n> changed files that are none of their business?  If so, it would be nice to \n> contribute the hook as a patch to contrib/.\n\nwrong guess ;)\nThe purpose is to check if source code still has debug code in\nit. Our policy is to have it removed before reaching master, but\nchecking by hand is way too buggy ;)\n\n--\nerik\n"},{"id":"92750","messageId":"alpine.DEB.1.00.0810101429280.22125@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"15849","inReplyTo":"20081010102603.GC303@Mac2.local","subject":"Re: merge hook","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-10-10T12:30:03Z","receivedAt":"2008-10-10T12:30:03Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 10 Oct 2008, Erik Colson wrote:\n\n> On Fri, Oct 10, 2008 at 12:07:16PM +0200, Johannes Schindelin wrote:\n> \n> > I guess that you want to disallow merging in changes from people who \n> > changed files that are none of their business?  If so, it would be \n> > nice to contribute the hook as a patch to contrib/.\n> \n> wrong guess ;) The purpose is to check if source code still has debug \n> code in it. Our policy is to have it removed before reaching master, but \n> checking by hand is way too buggy ;)\n\nHeh.  Still, if it is not too specific, would be nice to have it in \ncontrib/.  So I can point other people to it ;-)\n\nCiao,\nDscho\n"}]}