Working with git binary stream
- From
anatoly techtonik <techtonik@gmail.com>
- Date
- Aug 9, 2021, 16:12 UTC
- Message-ID
- <CAPkN8xJqqnJfdUM5fEEMA00JoKsFcqnQo--_qbCLAx1qXSrgdQ@mail.gmail.com>
Hi.
In https://lore.kernel.org/git/CAPkN8xK7JnhatkdurEb16bC0wb+=Khd=xJ51YQUXmf2H23YCGw@mail.gmail.com/T/#u it became clear that it is impossible to make fast-export followed by fast-import to get identical commit hashes for the resulting repository (try https://github.com/simons-public/protonfixes). It is also impossible to detect which commits would be altered as a result of this operation. Because fast-export/import does some implicit commit normalization, fixing that probably requires too much effort.
As an alternative it appeared that that theres is also a "git binary stream" log that is produced by
git cat-file --batch --batch-all-objects
Is there a way to reconstruct the repository given that stream? Is there documentation on how to read it?
-- anatoly t.