News for hackers. Stuff that matters.
Re:Reproducible Git Bundles by stepupmakeup on Monday December 25, 2023 @04:11PM (#38766158)
Why not just use tar or any other archive tool on the repository .git folder? Unless your repository is a un-gc'd mess with millions of unpacked objects...
Re:Reproducible Git Bundles by pbhn on Monday December 25, 2023 @04:47PM (#38766447)
I think that is a fair alternative, but restoring the backup means that the repository is in a bit of a weird state. Whereas a bundle can be cloned from nicely. Your way does have the property that it includes hooks and config, though (which could be desired or not).
Re:Reproducible Git Bundles by Ferret7446 on Monday December 25, 2023 @08:43PM (#38768194)
There are very few/no operations that will put a git repository in a "weird" state.

Actually, any snapshot of a Git repository is consistent (due to its CAS nature), minus the index which doesn't really need backup anyway.

Re:Reproducible Git Bundles by wkennington on Monday December 25, 2023 @11:16PM (#38768872)
This is also non-deterministic between versions of tar, but I guess for this usecase that would be fine. It’s just not good for reproducible build systems when trying to recreate tarballs after years.
Re:Reproducible Git Bundles by everybodyknows on Tuesday December 26, 2023 @01:22PM (#38774353)
Does not meet stated goal of the author:

> The naive solution of simply backing up the entire file-system tree is clearly not desirable since that would clutter the backup with useless build artifacts.

Build artifacts can be filtered out with tar --exclude patterns, but this is a language-dependent set that will require curation.

Re:Reproducible Git Bundles by cesarb on Tuesday December 26, 2023 @03:17PM (#38775621)
Wouldn't all these useless build artifacts be outside the .git folders?