hash: add an algo member to struct object_id
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 26 Apr 2021 01:02:49 +0000 (01:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Apr 2021 07:31:38 +0000 (16:31 +0900)
commitcf0983213c72727c4c7dea51ed9b3b38a2968fbe
treeb807a7c3cc34cbc06b9669de470220229ebd48a1
parent89b43f80a514aee58b662ad606e6352e03eaeee4
hash: add an algo member to struct object_id

Now that we're working with multiple hash algorithms in the same repo,
it's best if we label each object ID with its algorithm so we can
determine how to format a given object ID. Add a member called algo to
struct object_id.

Performance testing on object ID-heavy workloads doesn't reveal a clear
change in performance.  Out of performance tests t0001 and t1450, there
are slight variations in performance both up and down, but all
measurements are within the margin of error.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hash.h