Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git hardlinks in libexec/git-core become duplicated files #6

Open
hishamhm opened this issue Feb 24, 2017 · 0 comments
Open

Git hardlinks in libexec/git-core become duplicated files #6

hishamhm opened this issue Feb 24, 2017 · 0 comments
Labels

Comments

@hishamhm
Copy link
Member

hishamhm commented Feb 24, 2017

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.

@Nuc1eoN Nuc1eoN added the bug label Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants