mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Use legacy hash for legacy formats
We have a large variety of data formats and protocols where no hash algorithm was defined and the default was assumed to always be SHA-1. Instead of explicitly stating SHA-1, let's use the constant to represent the legacy hash algorithm (which is still SHA-1) so that it's clear for documentary purposes that it's a legacy fallback option and not an intentional choice to use SHA-1. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
dc9c16c2fc
commit
667d251a04
@@ -617,7 +617,7 @@ void packet_reader_init(struct packet_reader *reader, int fd,
|
||||
reader->buffer_size = sizeof(packet_buffer);
|
||||
reader->options = options;
|
||||
reader->me = "git";
|
||||
reader->hash_algo = &hash_algos[GIT_HASH_SHA1];
|
||||
reader->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY];
|
||||
strbuf_init(&reader->scratch, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user