Skip to content

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

@hishamhm

Description

@hishamhm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions