summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-06-08 21:27:19 +0900
committerNobuyoshi Nakada <[email protected]>2025-06-09 23:41:13 +0900
commit698cf146ace41841a6388d681abaf36d316c0778 ()
tree3ad8a1d59810b6aa732ffaf667c2945fc49ac09c /tool
parent3b17ff2457a138b1963de0a51c4b9281d2c930df (diff)
Fetch only necessary commits of bundled gems
Notes: Merged: https://.com/ruby/ruby/pull/13563
-rwxr-xr-xtool/fetch-bundled_gems.rb14
1 files changed, 8 insertions, 6 deletions
@@ -24,20 +24,22 @@ next unless n
next if n =~ /^#/
next if bundled_gems&.all? {|pat| !File.fnmatch?(pat, n)}
-if File.directory?(n)
- puts "updating #{color.notice(n)} ..."
- system("git", "fetch", "--all", chdir: n) or abort
-else
puts "retrieving #{color.notice(n)} ..."
- system(*%W"git clone #{u} #{n}") or abort
end
if r
puts "fetching #{color.notice(r)} ..."
system("git", "fetch", "origin", r, chdir: n) or abort
end
-c = r || "v#{v}"
checkout = %w"git -c advice.detachedHead=false checkout"
print %[checking out #{color.notice(c)} (v=#{color.info(v)}]
print %[, r=#{color.info(r)}] if r