diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-24 11:52:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-24 11:52:14 +0000 |
commit | 4cf6302d9d937915b291684f865356d9419b8823 (patch) | |
tree | 5fbfc93947a3307406e4183061d74b019545c306 /tool | |
parent | 80f50674781b2e8cbc40287142fb1d06f27e4d76 (diff) |
tool/git-refresh: fix branch operations
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/git-refresh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/git-refresh b/tool/git-refresh index 48096fde36..2ee5bbfa39 100755 --- a/tool/git-refresh +++ b/tool/git-refresh @@ -33,10 +33,10 @@ if [ -d "$dir" ]; then echo updating `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ... [ $quiet ] || set -x $CHDIR "$dir" - git fetch "$@" - exec git checkout ${branch:+"$branch"} "$@" + ${branch:+git fetch "$@"} + exec git ${branch:+checkout} "${branch:-pull}" "$@" else echo retrieving `expr "/$dir/" : '.*/\([^/][^/]*\)/'` ... [ $quiet ] || set -x - exec git clone "$url" "$dir" "$@" + exec git clone ${branch:+--branch "$branch"} "$url" "$dir" "$@" fi |