Re: [RTC/PATCH] Add 'update-branch' hook
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 21, 2014, 20:49 UTC
- Message-ID
- <53558476703cb_5c94d452ec4e@nysa.notmuch>
- In-Reply-To
- <5355793A.5020000@gmail.com>
Ilya Bobyr wrote:
Show 8 quoted lines
> On 4/20/2014 7:23 PM, Felipe Contreras wrote: > > This hook is invoked whenever a branch is updated, either when a branch > > is created or updated with 'git branch', or when it's rebased with 'git > > rebase'. It receives two parameters; the name of the branch, and the > > SHA-1 of the latest commit, additionally, if there was a base commit the > > branch was rebased onto, a third parameter contains it. > > And the old branch SHA could be found from in the reflog, correct?
Actually the old branch SHA-1 is actually the current one, since the branch hasn't been updated at that point. Personally I don't see much value in adding something the script can easily find out.
-- Felipe Contreras