Git mirrors: hardlink deduplication #228
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Most of the files in each copy of the same repo is exactly the same. We could save some space if we deduplicated the files. This can run on a timely basis (or activate after a new repo copy arrives).
Report from 24th of May
I'm going to work on this issue, the main folder to work in will be
modules/gickup/inside thepvv-nixos-configrepository.Tools to use
We're planning on using
jdupesto find equivalent files and create hard links.For time scheduling, use systemd-timer.
Core implementation idea:
Write a shell script (or equivalent) which uses
jdupesto search through all git mirrors on the filesystem.The script shall look across the repositories and look for files which are equivalent.
If there are files which are equivalent (even across repositories) then make all files hardlink to one inode.
One example mentioned is that many repositories may have the same LICENSE file.
Finally, use systemd-timer to make the script run once a day.
The final product will be something like a
systemd-unitwhich you can enable by doingsomething like
systemctl enable git-mirror-hardlink-dedup.service.