Using full ref name to support older git versions, when verifying the branch

This commit is contained in:
Guy Arad
2018-03-27 11:56:13 +03:00
parent 269330a452
commit 1c42e8418d

View File

@@ -15,7 +15,7 @@ verify_repo_remote() {
}
verify_repo_branch() {
local name="$(cd "$1" && git name-rev --refs='heads/*' --name-only HEAD 2>/dev/null)"
local name="$(cd "$1" && git name-rev --refs='refs/heads/*' --name-only HEAD 2>/dev/null)"
[[ "${name}" == "${BRANCH}" ]]
}