From 5051daebf722a9020b015feabc4c39e6bdb187f1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 28 May 2014 01:25:51 -0400 Subject: gitget checkout: behave correctly when $ref is a tag --- src/gitget/gitget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3