summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-01-31 13:55:28 +0100
committerJunio C Hamano <gitster@pobox.com>2025-01-31 10:06:10 -0800
commit52eef501e17078b369da571d7e6b72c7494bb779 (patch)
tree706be7e5e77e83bb4265e7619adc0f9346719339 /diff.c
parent0cbcba54550b1ea108e977c24b835e07b96b1c0e (diff)
hash: convert hashing context to a structure
The `git_hash_context` is a union containing the different hash-specific states for SHA1, its unsafe variant as well as SHA256. We know that only one of these states will ever be in use at the same time because hash contexts cannot be used for multiple different hashes at the same point in time. We're about to extend the structure though to keep track of the hash algorithm used to initialize the context, which is impossible to do while the context is a union. Refactor it to instead be a structure that contains the union of context states. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions