Skip to content
Snippets Groups Projects
Verified Commit 2b87e4ae authored by Karel Koci's avatar Karel Koci :metal:
Browse files

githooks: fix push reject when develop is directly based on master

The issue this fixes is that git reports same commit as being ancestor
of itself. It kind of makes sense but it breaks check if branch is based
on master or develop. In such case the common base between develop and
target branch and master and target branch is the same.

This changes the logic. Because git merge-base does effectively the
operation of 'less than or equal' we have to swap compare order and
negate the result. This way we get effectively the 'less than'
operation.
parent e9888b26
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment