On 4/21/2014 1:49 PM, Felipe Contreras wrote:
> Ilya Bobyr wrote:
>> 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.
I did not understand that from the description. That was my next
comment that I did not send just yet.
All the other hooks describe in detail if they are run before or after
the operation, and if it is possible to cancel the operation.
Also, most have names that start with either "pre-" or "post-".
It seems reasonable for both "pre-update-branch" and
"post-update-branch" to exist.
This one would be "pre-update-branch", I guess.
I was also wondering about "git reset". It could also change the branch
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html