• brian m. carlson's avatar
    Integrate hash algorithm support with repo setup · 78a67668
    brian m. carlson authored
    In future versions of Git, we plan to support an additional hash
    algorithm.  Integrate the enumeration of hash algorithms with repository
    setup, and store a pointer to the enumerated data in struct repository.
    Of course, we currently only support SHA-1, so hard-code this value in
    read_repository_format.  In the future, we'll enumerate this value from
    the configuration.
    Add a constant, the_hash_algo, which points to the hash_algo structure
    pointer in the repository global.  Note that this is the hash which is
    used to serialize data to disk, not the hash which is used to display
    items to the user.  The transition plan anticipates that these may be
    different.  We can add an additional element in the future (say,
    ui_hash_algo) to provide for this case.
    Include repository.h in cache.h since we now need to have access to
    these struct and variable definitions.
    Signed-off-by: brian m. carlson's avatarbrian m. carlson <sandals@crustytoothpaste.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
repository.h 3.08 KB