mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +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}"
|
local branch="${2}"
|
||||||
|
|
||||||
cd "${directory}" || return 1
|
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
|
update=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git checkout "${branch}" || return 1
|
|
||||||
git pull || return 1
|
git pull || return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user