summaryrefslogtreecommitdiff
path: root/src/gitget
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-05-28 01:25:51 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-05-28 01:25:51 -0400
commit5051daebf722a9020b015feabc4c39e6bdb187f1 (patch)
treec2e42f81ec1f30efdd525bb8e646c98b6a187e8c /src/gitget
parentb247261b96339a59e74c9d705fe06ab38bd9e634 (diff)
gitget checkout: behave correctly when $ref is a tag
Diffstat (limited to 'src/gitget')
-rwxr-xr-xsrc/gitget/gitget2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gitget/gitget b/src/gitget/gitget
index a748943..fe5d46b 100755
--- a/src/gitget/gitget
+++ b/src/gitget/gitget
@@ -87,7 +87,7 @@ download_git_checkout() {
fi
fi
msg2 "Updating %s %s repo..." "${name}" "git"
- if ! git pull origin "$ref"; then
+ if ! { git fetch --all -p && git checkout "$ref" && git pull origin "$ref"; } ; then
# only warn on failure to allow offline builds
warning "Failure while updating %s %s repo" "${repo}" "git"
fi