diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-06-12 10:03:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-12 12:57:18 -0700 |
commit | 59ff92c516be0a2b0292acea869c6ac79f8bae5c (patch) | |
tree | cb2e59b97474226ea1ce9ed92b75b2205434291f /commit-graph.c | |
parent | 524c0183c999c59940ce1a8712b78e4dbd87ae60 (diff) |
parse-options-cb: stop clamping "--abbrev=" to hash length
The `OPT__ABBREV()` option allows the user to specify the length that
object hashes shall be abbreviated to. This length needs to be in the
range of `(MIN_ABBREV, the_hash_algo->hexsz)`, which is why we clamp the
value as required. While this makes sense in the case of `MIN_ABBREV`,
it is unnecessary for the upper boundary as the value is eventually
passed down to `repo_find_unnique_abbrev_r()`, which handles values
larger than the current hash length just fine.
In the preceding commit, we have changed parsing of the "core.abbrev"
config to stop clamping to the upper boundary. Let's do the same here so
that the code becomes simpler, we are consistent with how we treat the
"core.abbrev" config and so that we stop depending on `the_repository`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions