mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-26 06:32:13 +00:00
SCRIPTS: backport: fix the master branch detection
The condition was inverted. When the branch was the master, it was harmless because it caused an extra "checkout master", but when it was not the master, the commit could be applied to the wrong branch and it could even possibly not match the name to stop on.
This commit is contained in:
parent
3823408b60
commit
f9beea52da
@ -67,7 +67,7 @@ check_clean() {
|
||||
|
||||
# verifies that HEAD is the master
|
||||
check_master() {
|
||||
test "$(git rev-parse --verify -q HEAD 2>&1)" != "$(git rev-parse --verify -q master 2>&1)"
|
||||
test "$(git rev-parse --verify -q HEAD 2>&1)" = "$(git rev-parse --verify -q master 2>&1)"
|
||||
}
|
||||
|
||||
# tries to switch to the master branch, only if the current one is clean. Dies on failure.
|
||||
|
Loading…
Reference in New Issue
Block a user