aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-24 11:52:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-24 11:52:14 +0000
commit2f22588000fc4027ec2d9366186c1a8efb68c7a4 (patch)
tree5fbfc93947a3307406e4183061d74b019545c306
parentb2abac2e8b475e0e19a398e79b7ff2b6170e1d3d (diff)
downloadruby-2f22588000fc4027ec2d9366186c1a8efb68c7a4.tar.gz
tool/git-refresh: fix branch operations
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rwxr-xr-xtool/git-refresh6
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