mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Can only diff once upstream branch is tracked
This commit is contained in:
parent
9a9d9007cd
commit
38547ced7a
@ -63,11 +63,15 @@ checkout_pull_branch() {
|
||||
local branch="${2}"
|
||||
|
||||
cd "${directory}" || return 1
|
||||
if [ "$(git diff "${branch}" | grep -c "^")" -gt "0" ]; then
|
||||
|
||||
local oldbranch="$(git symbolic-ref HEAD)"
|
||||
|
||||
git checkout "${branch}" || return 1
|
||||
|
||||
if [ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]; then
|
||||
update=true
|
||||
fi
|
||||
|
||||
git checkout "${branch}" || return 1
|
||||
git pull || return 1
|
||||
return 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user