Add script to trim the repository #188
Reference in New Issue
Block a user
Delete Branch "trim-repository"
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?
Instead of using a PR that makes it hard to tell what is going on, I would like to instead agree on a script that would trim the repo, and then we can agree if the result is fine. Then we simply push it as the new master branch. It also keeps the record of what we used in case we need to revisit it in the future. The script needs the
git-filter-repocommand, available in nixpkgs.The new jungle repository is almost 25 times smaller (57M -> 2,3M) and the content of the current HEAD (which is what nix copies to the store) is 43 times smaller (30M -> 700K).
The new master branch is here: https://jungle.bsc.es/git/rarias/jungle/src/branch/new-master/
The website is available here: https://jungle.bsc.es/git/rarias/jungle-website
The author and commit dates are preserved after the rewrite:
Fixes: #171
@@ -3,3 +3,3 @@website = pkgs.stdenv.mkDerivation {name = "jungle-web";src = theFlake;src = pkgs.fetchgit {We should also fix
m/hut/nginx.nixYes, I think I would just duplicate the changes there for now.
e4eab5f027to4143186bd0LGTM, and my results match the sizes reported.
Only issue is that
hutandtentconfigs will be broken from the point where the hugo website was added to nginx till the fix in the latest commit. Do we care about that?I plan to keep a backup repository in case you need to go back to a previous commit from the old history. I don't think we can keep it in another branch without bloating the clone size. That should cover any of those cases, no?
Here: https://jungle.bsc.es/git/rarias/jungle-backup
Yes, that seems reasonable. The other alternative is to amend the original nginx commits, but it would overcomplicate things.
4143186bd0to5cfd7f0858