-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
A lot of space is wasted because over a hundred files are actually the same binary with different names, which should be hard links, but because of mounting/copying/etc that happens in the system, end up becoming 100+ different files (over 200MB).
cd /Programs/Git/Current/libexec/git-core
du | tail -n 1
# --> 223356 .
md5sum * | grep ^033 | cut -d' ' -f2- | grep git- > hardlinks.txt
for f in `cat hardlinks.txt`; do ln -nf git $f; done
for f in git-remote-*; do ln -nf git-remote-ftp $f; done
du | tail -n 1
# --> 18952 .Not all files in libexec/git-core are the same binary, but md5sum * shows which ones are meant to be.
A possible fix is to tweak the Git recipe to replace these by symlinks, but I haven't tested this approach yet.
Another possibility is to write a PostInstall rule that converts duplicates into hardlinks, but that would still waste considerable space in the ISO.