1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use git pull instead of git fetch if master branch

This commit is contained in:
Kazuhiro NISHIYAMA 2019-09-04 12:36:45 +09:00
parent 1e30d0af7d
commit 967ef0d4f6
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -19,7 +19,11 @@ end
if File.directory?(n)
puts "updating #{n} ..."
system(*%W"git fetch", chdir: n) or abort
if v == "master"
system(*%W"git pull", chdir: n) or abort
else
system(*%W"git fetch", chdir: n) or abort
end
else
puts "retrieving #{n} ..."
system(*%W"git clone #{u} #{n}") or abort