From: Stephen Leake Date: Thu, 24 Apr 2014 14:26:19 GMT Subject: Re: [RTC/PATCH] Add 'update-branch' hook Message-ID: <8538h24xdg.fsf@stephe-leake.org> In-Reply-To: <535782d95bbed_24448772ec7a@nysa.notmuch> Felipe Contreras writes: >> >> I have a branch which should always be recompiled on update; >> >> post-update-branch would be a good place for that. >> > >> > And why would pre-update-branch not serve that purpose? >> >> Because the code that needs to be compiled is not yet in the workspace > > And it won't be in 'post-update-branch' either. Then you are using a very odd definition of "post update" > % git checkout master > % git branch feature-a stable > <- update-branch hook will be called here > > The hook will get 'feature-a' as the first argument, but the code in the > workspace would correspond to 'master'; the checked out branch (pre or post). Then the hooks should be called 'pre-branch', 'post-branch'; there is no "update" involved. The hook I need is actually "post-merge", since "merge" is the command that updates the workspace. Sorry for the noise. -- -- Stephe