diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-28 01:25:51 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-28 01:25:51 -0400 |
commit | 5051daebf722a9020b015feabc4c39e6bdb187f1 (patch) | |
tree | c2e42f81ec1f30efdd525bb8e646c98b6a187e8c /src | |
parent | b247261b96339a59e74c9d705fe06ab38bd9e634 (diff) |
gitget checkout: behave correctly when $ref is a tag
Diffstat (limited to 'src')
-rwxr-xr-x | src/gitget/gitget | 2 |
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 |