Skip to content

Instantly share code, notes, and snippets.

@tarnacious
Created September 13, 2018 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarnacious/71b1beb5ff814d245634d6c50ddbe295 to your computer and use it in GitHub Desktop.
Save tarnacious/71b1beb5ff814d245634d6c50ddbe295 to your computer and use it in GitHub Desktop.
How big are all the rails patches combined into a file and compressed?
# clone
git clone https://github.com/rails/rails
# change working dir
cd rails
# grab all the branches
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
# append all the patches to a file
while read -r rev; do
git show $rev >> ../all_patches
done < <(git rev-list --all)
# back
cd ..
# compress
bzip2 all_patches
# how big?
du -h all_patches.bz2
# 53M all_patches.bz2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment