mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-08 16:40:17 +00:00
Don't need to remember pwd
inside a function, calling function doesn't change directories.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
56e17d1010
commit
89ff99322d
1 changed files with 2 additions and 7 deletions
|
@ -21,15 +21,10 @@ readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git"
|
||||||
fully_fetch_repo() {
|
fully_fetch_repo() {
|
||||||
# Add upstream branches to shallow clone
|
# Add upstream branches to shallow clone
|
||||||
local directory="${1}"
|
local directory="${1}"
|
||||||
local curdir
|
|
||||||
local rc
|
|
||||||
|
|
||||||
curdir="${PWD}"
|
|
||||||
cd "${directory}" || return 1
|
cd "${directory}" || return 1
|
||||||
git remote set-branches origin '*' || return 1
|
git fetch --quiet --unshallow || return 1
|
||||||
git fetch --quiet || return 1
|
return 0
|
||||||
cd "${curdir}" || return 1
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get_available_branches(){
|
get_available_branches(){
|
||||||
|
|
Loading…
Add table
Reference in a new issue