Convert GIT_SHA1_RAWSZ used for allocation to GIT_MAX_RAWSZ
Since we will likely be introducing a new hash function at some point, and that hash function might be longer than 20 bytes, use the constant GIT_MAX_RAWSZ, which is designed to be suitable for allocations, instead of GIT_SHA1_RAWSZ. This will ease the transition down the line by distinguishing between places where we need to allocate memory suitable for the largest hash from those where we need to handle the current hash. 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
dc01505f7f
commit
cd02599c48
@ -80,7 +80,7 @@ struct wt_status {
|
||||
int hints;
|
||||
|
||||
enum wt_status_format status_format;
|
||||
unsigned char sha1_commit[GIT_SHA1_RAWSZ]; /* when not Initial */
|
||||
unsigned char sha1_commit[GIT_MAX_RAWSZ]; /* when not Initial */
|
||||
|
||||
/* These are computed during processing of the individual sections */
|
||||
int commitable;
|
||||
|
Reference in New Issue
Block a user