aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2026-02-07 20:04:37 +0000
committerJunio C Hamano <gitster@pobox.com>2026-02-07 17:41:02 -0800
commit86215ab0cc632026a95aa955ebe94c8f33ff2be6 (patch)
tree2394e3a3e9a19459c3f43dafa87920a90f5c891b /src/lib.rs
parent9005b5bb72df521670db03eefeafe53c0a81f9a5 (diff)
downloadgit-86215ab0cc632026a95aa955ebe94c8f33ff2be6.tar.xz
rust: add additional helpers for ObjectID
Right now, users can internally access the contents of the ObjectID struct, which can lead to data that is not valid, such as invalid algorithms or non-zero-padded hash values. These can cause problems down the line as we use them more. Add a constructor for ObjectID that allows us to set these values and also provide an accessor for the algorithm so that we can access it. In addition, provide useful Display and Debug implementations that can format our data in a useful way. Now that we have the ability to work with these various components in a nice way, add some tests as well to make sure that ObjectID and HashAlgorithm work together as expected. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'src/lib.rs')
0 files changed, 0 insertions, 0 deletions