From de12756765f573b03821b252a47e68a088090eb0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 25 May 2014 19:46:35 -0400 Subject: Well... libregit was broken --- src/gitget/libregit | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gitget') diff --git a/src/gitget/libregit b/src/gitget/libregit index 25550e5..f3bcfd7 100755 --- a/src/gitget/libregit +++ b/src/gitget/libregit @@ -40,3 +40,5 @@ main() { gitget checkout "${repo}#ref=${ref}" "${dir}" } + +main "$@" -- cgit v1.2.3-2-g168b From b247261b96339a59e74c9d705fe06ab38bd9e634 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 25 May 2014 20:12:34 -0400 Subject: touch up usage() text in src/gitget --- src/gitget/gitget | 3 +-- src/gitget/libregit | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/gitget') diff --git a/src/gitget/gitget b/src/gitget/gitget index bcc528c..a748943 100755 --- a/src/gitget/gitget +++ b/src/gitget/gitget @@ -145,8 +145,7 @@ download_git_bare() { } usage() { - print 'Usage: %s [OPTIONS] bare URL DIRECTORY' "${0##*/}" - print 'Usage: %s [OPTIONS] checkout URL DIRECTORY' "${0##*/}" + print 'Usage: %s [OPTIONS] [bare|checkout] URL DIRECTORY' "${0##*/}" print 'A URL-handler for git urls. Capable of updating or cloning.' echo prose "Clones or pulls from the git URL, to a local DIRECTORY. If diff --git a/src/gitget/libregit b/src/gitget/libregit index f3bcfd7..41aefc3 100755 --- a/src/gitget/libregit +++ b/src/gitget/libregit @@ -20,18 +20,17 @@ . libremessages usage() { - print 'Usage: %s repo ref dir' "${0##*/}" + print 'Usage: %s REPO REF DIR' "${0##*/}" print 'A compatability wrapper around `gitget checkout`' echo prose "This exists because gitget used to be called libregit, and took the arguments in this format, and I'm sure there are a few scripts floating around that use it." echo - prose "Clones or pulls from the git URL 'repo', and checks out the git - ref 'ref' to the directory 'dir'." + prose "Clones or pulls from the git URL '', and checks out the git + ref '' to the directory ''." } - main() { [[ $# == 3 ]] || { usage >&2; return 1; } repo=$1 -- cgit v1.2.3-2-g168b 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/gitget') 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-2-g168b