I need to write a hook that will allow merge commits ONLY if the merge
is coming from a specific branch.
I know about "git branch --contains" but that checks ALL the branches to
see if the commit is on any them, and with the number of branches we
have that takes a non-trivial amount of time. Since this is in a push
hook I really need it to be as fast as possible, and it seems to me that
if I could ask for just a specific branch, "is this commit on this
specific branch" rather than "what are all the branches this commit is
on", it would be faster.
But I can't quite find a good way to do that. I mean, I can list the
entire history of the branch then search it by hand, but that seems
inefficient as well.
Is there some plumbing command or similar that will check if a specific
commit exists a specific branch, fast?
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.