diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-06-08 21:27:19 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-06-09 23:41:13 +0900 |
commit | 698cf146ace41841a6388d681abaf36d316c0778 () | |
tree | 3ad8a1d59810b6aa732ffaf667c2945fc49ac09c | |
parent | 3b17ff2457a138b1963de0a51c4b9281d2c930df (diff) |
Fetch only necessary commits of bundled gems
Notes: Merged: https://.com/ruby/ruby/pull/13563
-rw-r--r-- | defs/gmake.mk | 2 | ||||
-rwxr-xr-x | tool/fetch-bundled_gems.rb | 14 |
2 files changed, 9 insertions, 7 deletions
@@ -365,7 +365,7 @@ $(srcdir)/.bundle/.timestamp: define build-gem $(srcdir)/gems/src/$(1)/.git: | $(srcdir)/gems/src $(ECHO) Cloning $(4) - $(Q) $(GIT) clone $(4) $$(@D) $(bundled-gem-revision): \ $(if $(if $(wildcard $$(@)),$(filter $(3),$(shell cat $$(@)))),,PHONY) \ @@ -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 |