{"thread":{"id":"24565","subject":"hooks not fired by a merge's auto-commit","startedAt":"2010-07-29T01:25:36Z","lastAt":"2010-08-01T23:27:28Z","messageCount":3,"participants":["Richard Bronosky","Junio C Hamano","Jay Soffian"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"146679","messageId":"AANLkTindr-y0uAu46FVEqtB5BLw9ZjB0y0ETwmW+8+PV@mail.gmail.com","threadId":"24565","inReplyTo":null,"subject":"hooks not fired by a merge's auto-commit","fromName":"Richard Bronosky","fromEmail":"richard@bronosky.com","sentAt":"2010-07-29T01:25:36Z","receivedAt":"2010-07-29T01:25:36Z","isPatch":false,"sender":{"key":"richard@bronosky.com","avatar":null},"body":"Using git 1.7.1 it seems that a merge (more specifically the\nauto-commit) does not fire any of the following hooks:\npre-commit  prepare-commit-msg commit-msg\n\nIs that by design?\nWould it be folly to try to patch that behavior?\n\nI humbly request your input before I go trying to \"correct\" this behavior.\n\n-- \n.!# RichardBronosky #!.\n"},{"id":"146722","messageId":"7vzkxatepy.fsf@alter.siamese.dyndns.org","threadId":"24565","inReplyTo":"AANLkTindr-y0uAu46FVEqtB5BLw9ZjB0y0ETwmW+8+PV@mail.gmail.com","subject":"Re: hooks not fired by a merge's auto-commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-07-29T16:50:01Z","receivedAt":"2010-07-29T16:50:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Richard Bronosky <Richard@Bronosky.com> writes:\n\n> Using git 1.7.1 it seems that a merge (more specifically the\n> auto-commit) does not fire any of the following hooks:\n> pre-commit  prepare-commit-msg commit-msg\n>\n> Is that by design?\n\nI would probably call it an unintended design that now has long been\nestablished that changing it may break people's existing setups rather\nbadly.\n\nEspecially pre-commit hooks that look for and prevent common mistakes from\nhappening for individual developers may not want to run, when you are\npulling in other people's work that already has the mess they created.\nSuch problems are often either too late to fix or you are in no position\nto reject their pull requests.  So you would break _my_ workflow (and\nothers who play similar roles as me, making changes themselves and merging\nothers work) if you did such a change.\n\nYou _could_ add pre-merge to introduce it as a new feature.  For people\nwho want to apply the same check for merges and individual commits\n(e.g. those who never merge other's work), pre-merge can just invoke\npre-commit.\n"},{"id":"146919","messageId":"AANLkTikXRRB4nqWP1VEUv2V86bR4MRr2PE0MQp_PvPRC@mail.gmail.com","threadId":"24565","inReplyTo":"7vzkxatepy.fsf@alter.siamese.dyndns.org","subject":"Re: hooks not fired by a merge's auto-commit","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-08-01T23:27:28Z","receivedAt":"2010-08-01T23:27:28Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Thu, Jul 29, 2010 at 12:50 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Richard Bronosky <Richard@Bronosky.com> writes:\n>\n>> Using git 1.7.1 it seems that a merge (more specifically the\n>> auto-commit) does not fire any of the following hooks:\n>> pre-commit  prepare-commit-msg commit-msg\n>>\n>> Is that by design?\n>\n> I would probably call it an unintended design that now has long been\n> established that changing it may break people's existing setups rather\n> badly.\n>\n> Especially pre-commit hooks that look for and prevent common mistakes from\n> happening for individual developers may not want to run, when you are\n> pulling in other people's work that already has the mess they created.\n> Such problems are often either too late to fix or you are in no position\n> to reject their pull requests.  So you would break _my_ workflow (and\n> others who play similar roles as me, making changes themselves and merging\n> others work) if you did such a change.\n>\n> You _could_ add pre-merge to introduce it as a new feature.  For people\n> who want to apply the same check for merges and individual commits\n> (e.g. those who never merge other's work), pre-merge can just invoke\n> pre-commit.\n\nAlso see http://thread.gmane.org/gmane.comp.version-control.git/151297/\n\nj.\n"}]}