1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-19 14:48:13 +00:00

stash changes on branch switch, else it fails if any changes have been made.

This commit is contained in:
Adam Warner 2017-04-14 17:20:13 +01:00
parent b1484104bd
commit 2e398c5da4
No known key found for this signature in database
GPG Key ID: 7C062498C7FA6E49

View File

@ -54,6 +54,8 @@ fetch_checkout_pull_branch() {
# Set the reference for the requested branch, fetch, check it put and pull it # Set the reference for the requested branch, fetch, check it put and pull it
cd "${directory}" cd "${directory}"
git remote set-branches origin "${branch}" || return 1 git remote set-branches origin "${branch}" || return 1
git stash --all --quiet &> /dev/null || return 1
git clean --force -d || return 1
git fetch --quiet || return 1 git fetch --quiet || return 1
checkout_pull_branch "${directory}" "${branch}" || return 1 checkout_pull_branch "${directory}" "${branch}" || return 1
} }