[HN Gopher] Reproducible Git Bundles
       ___________________________________________________________________
        
       Reproducible Git Bundles
        
       Author : pbhn
       Score  : 57 points
       Date   : 2023-12-25 17:40 UTC (5 hours ago)
        
 (HTM) web link (baecher.dev)
 (TXT) w3m dump (baecher.dev)
        
       | stepupmakeup wrote:
       | 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...
        
         | pbhn wrote:
         | 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).
        
       | chmaynard wrote:
       | An engaging post and a lovely piece of sleuthing. Thanks!
        
       | raimue wrote:
       | The question is whether you can expect this format to stay stable
       | and reproducible across git versions. Remember the fallout from
       | git 2.38 when the output of 'git archive' changed. Although for
       | this backup use case it would just mean the next backup with a
       | new format would make a full copy once.
        
         | jacoblambda wrote:
         | git bundles have a standardised format (defined in [1]) while
         | git archives did not and continue to not have one. Git can
         | still handle all previous bundle versions and you can specify
         | which version of the bundle standard you want to use when
         | creating bundles.
         | 
         | So no the git 2.38 issue should not be a problem for bundles
         | even if the format changes in the future.
         | 
         | 1. https://git-scm.com/docs/gitformat-bundle
        
       ___________________________________________________________________
       (page generated 2023-12-25 23:00 UTC)