Mercurial > hg
changeset 50165:4180c988d1d5
rhg: small refactor: stop using a magical constant "+ 1"
Instead, directly do what the "+ 1" was supposed to achive:
call hash_encode.
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Thu, 16 Feb 2023 19:14:51 +0000 |
parents | 8e50aa0db347 |
children | 6ea3b1acb5de |
files | rust/hg-core/src/revlog/path_encode.rs |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/path_encode.rs Thu Feb 16 19:03:17 2023 +0000 +++ b/rust/hg-core/src/revlog/path_encode.rs Thu Feb 16 19:14:51 2023 +0000 @@ -600,7 +600,7 @@ basic_encode(&mut measure, path); measure.len } else { - MAXSTOREPATHLEN + 1 + return hash_encode(path); }; if newlen <= MAXSTOREPATHLEN { if newlen == path.len() {