Skip to content

git: Add code to parse reftable tables

We generally don't have to parse reftable's as this is handled entirely by Git. But for testing the transaction manager, it is essential that we test the integrity of files being added to the log. For reftables, this is done by ensuring that the correct ref updates have been added. To do this, we'd need to peak into the reftable file.

Let's add a 'reftable' package to do this, currently the code is very limited to our use case:

  1. It only parses ref blocks and not other blocks.
  2. It doesn't perform CR32 validation of the data since it is only needed for reading the refs.
  3. It is only allowed to run in tests. For all production code, we should rely on Git and its implementation.

Part of #5867 (closed)

Merge request reports

Loading