config: use the_hash_algo in abbrev comparison

Switch one use of a hard-coded 40 constant to use the_hash_algo. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Aug 18, 2019 at 20:04 UTC fe9fec45f68e0d9850bf13da57b3e7a99fc33444
1 file changed +1 -1
config.c
+1 -1
@@ -1204,7 +1204,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
1204 default_abbrev = -1;
1205 else {
1206 int abbrev = git_config_int(var, value);
1207 - if (abbrev < minimum_abbrev || abbrev > 40)
1207 + if (abbrev < minimum_abbrev || abbrev > the_hash_algo->hexsz)
1208 return error(_("abbrev length out of range: %d"), abbrev);
1209 default_abbrev = abbrev;
1210 }