Re: [PATCH v2 3/7] reftable/system: stop depending on "hash.h"
Patrick Steinhardt <ps@pks.im> writes:
Show 9 quoted lines
> We include "hash.h" in "reftable/system.h" such that we can use hash
> format IDs as well as the raw size of SHA1 and SHA256. As we are in the
> process of converting the reftable library to become standalone we of
> course cannot rely on those constants anymore.
>
> Introduce a new `enum reftable_hash` to replace internal uses of the
> hash format IDs and new constants that replace internal uses of the hash
> size. Adapt the reftable backend to set up the correct hash function.
>
So with this patch, we now have:
- `REFTABLE_FORMAT_ID_SHA1` & `REFTABLE_FORMAT_ID_SHA256` which is
what is stored on disk and used while reading/writing.
- `enum reftable_hash` which is used to identify the hash function
internally in the reftable code.
Both of which are separated. Nice!
- Karthik