Is there a way to tell Git to create packfiles based on file types, and to specify the delta-ification and zlib compression for those classes / types?
I have a rather large repository, much of which is composed of image assets and translation files (.po), the latter actually being the largest fraction of the working copy and the repository data.
- For the image assets, neither delta nor zlib compression are useful: the images are already compress (so they don't compress well under zlib) and delta compression does nothing useful when small changes tend to cascade through the compressed image (and are rare anyway, usually once the asset is committed it's either left alone forever or replaced wholesale).
- For the PO files, while they're technically text files I would expect them to delta-compress very badly for this specific repository: the historical generator / exporter would export the translations in essentially random order so from one export to the next it's as if the entire file has been rewritten.
As a result, when the repository is repacked I'd like to try packing the images together neither delta-compress nor zlib-compress them, and the PO files together and zlib-compress them (at the maximum possible level) but not delta-compress them. This way they ought not waste cycles on useless compression work, and should avoid polluting the compression of more "normal" code files.
However my previous experiments in packfiles did not go well. Is there builtin support for this sort of segregation & configuration which I missed, or would I need to build the packs by hand using low-level commands or even libgit2 directly?
question from:
https://stackoverflow.com/questions/65881273/git-repack-segregating-by-file-type-configuring-packs-by-group 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…