diff options
author | Karel Kočí <cynerd@email.cz> | 2018-08-26 16:46:21 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-08-26 16:46:21 +0200 |
commit | 16ce36f5c70ad57aba52e8bc3af2d2e1c30fc292 (patch) | |
tree | c4b8033621be674ac62db265b5ec9fdd32e21e34 /scripts/utils | |
parent | 5c1c57b66d120fa0090b2e12f0f0a29b1a385715 (diff) | |
download | laminar-cnf-16ce36f5c70ad57aba52e8bc3af2d2e1c30fc292.tar.gz laminar-cnf-16ce36f5c70ad57aba52e8bc3af2d2e1c30fc292.tar.bz2 laminar-cnf-16ce36f5c70ad57aba52e8bc3af2d2e1c30fc292.zip |
Try to fix git_fetch utils
Diffstat (limited to 'scripts/utils')
-rw-r--r-- | scripts/utils | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/utils b/scripts/utils index b88d4a4..58372c5 100644 --- a/scripts/utils +++ b/scripts/utils @@ -14,10 +14,10 @@ git_fetch() { local BRANCH="$3" [ -n "$BRANCH" ] || BRANCH=master local GITARGS="--git-dir='$WORKSPACE/$2' --bare" - if [ ! -d "$WORKSPACE/$2" ]; then - git clone --bare "$1" "$WORKSPACE/$2" - else + if [ -d "$WORKSPACE/$2/.git" ]; then git $GITARGS fetch --prune --prune-tags --force "$1" "$BRANCH:$BRANCH" + else + git clone --bare "$1" "$WORKSPACE/$2" fi git $GITARGS worktree add --detach $2 $BRANCH } |