diff options
author | Daniel Colson <[email protected]> | 2024-09-06 13:10:04 -0400 |
---|---|---|
committer | git <[email protected]> | 2024-09-09 11:59:52 +0000 |
commit | 966901b39dd7b37eec68dd6e8a76a79827dc522f (patch) | |
tree | 32d0633c9cdeaaf92aed13c0c7c774033abd5595 /lib/bundler/source | |
parent | 3aae0873f71098946fa06d8428205762a26e1f27 (diff) |
[rubygems/rubygems] Don't include hook templates in cached git source
With a default git setup, each cloned repo in the cache will end up with
~60K of sample git hooks. These files all end in `.sample`, and they are
disabled by default. Deleting them should be a no-op, and makes the
cache a bit smaller.
https://github.com/rubygems/rubygems/commit/d2149999cd
Diffstat (limited to 'lib/bundler/source')
-rw-r--r-- | lib/bundler/source/git.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 4e94645f6b..2a327e5fb6 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -226,6 +226,7 @@ module Bundler git_proxy.checkout if requires_checkout? FileUtils.cp_r("#{cache_path}/.", app_cache_path) FileUtils.touch(app_cache_path.join(".bundlecache")) + FileUtils.rm_rf(Dir.glob(app_cache_path.join("hooks/*.sample"))) end def load_spec_files |