{"thread":{"id":"32850","subject":"Preventing merges from one branch into others","startedAt":"2013-02-07T19:14:40Z","lastAt":"2013-02-07T19:38:51Z","messageCount":2,"participants":["Tim Chase","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"208933","messageId":"20130207131440.716c1022@bigbox.christie.dr","threadId":"32850","inReplyTo":null,"subject":"Preventing merges from one branch into others","fromName":"Tim Chase","fromEmail":"git@tim.thechases.com","sentAt":"2013-02-07T19:14:40Z","receivedAt":"2013-02-07T19:14:40Z","isPatch":false,"sender":{"key":"git@tim.thechases.com","avatar":null},"body":"[tried IRC to no avail]\nI've been trying to find a way to prevent myself from merging a\nclient-specific branch back into my dev/master branches.  Is there an\neasy/straightforward way to do this (perhaps via a hook)?  I didn't\nsee any sort of \"pre-merge\" hook script.  Visualized:\n\n  A -> B -> C [dev]\n   \\\n    -> Q -> R -> S [customer-specific]\n\nand I want to ensure that changes Q/R/S never find their way back\ninto dev.\n\nSo I was hoping some sort of \"hey, you're an idiot for trying to merge\n$CUSTOMER_BRANCH back into dev/master\" warning. :-)\n\n-tkc\n"},{"id":"208939","messageId":"7v8v6z7w38.fsf@alter.siamese.dyndns.org","threadId":"32850","inReplyTo":"20130207131440.716c1022@bigbox.christie.dr","subject":"Re: Preventing merges from one branch into others","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-02-07T19:38:51Z","receivedAt":"2013-02-07T19:38:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tim Chase <git@tim.thechases.com> writes:\n\n> ...  I didn't\n> see any sort of \"pre-merge\" hook script.\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/94111/focus=71069\n\nI think yours is a canonical example of \"I do not want to run\ncommand X when these conditions hold\", when \"these conditions\" can\nbe checked locally _before_ you decide to do X.\n\nWhile it is theoretically possible to give X a pre-X hook in such a\ncase, we do not want it to be the first choice to avoid hook bloat.\n"}]}