commit 4b4fd6aa67065da8141a7a08bda84b95bc6ae060 from: Omar Polo date: Thu Aug 01 16:03:53 2024 UTC do not talk about "SHA1 checksum"s in documentation comments these functions are really taking a struct got_object_id or depend on the hashing algorithm of the repo so update the comments to match the reality. commit - 338c18384ab94857d9c176451debca19c224a597 commit + 4b4fd6aa67065da8141a7a08bda84b95bc6ae060 blob - 4ace88b7e3ac64b1a5b78bf1f0652f1c0116658c blob + 49498058010672bb63ea9d190a831fc8226fe241 --- include/got_diff.h +++ include/got_diff.h @@ -55,7 +55,7 @@ struct got_diffstat_cb_arg; * blob object arguments should be set to NULL. * Two const char * diff header labels may be provided which will be used * to identify each blob in the diff output. - * If a label is NULL, use the blob's SHA1 checksum instead. + * If a label is NULL, use the blob's hash instead. * The number of context lines to show in the diff must be specified as well. * Whitespace differences may optionally be ignored. * If not NULL, the two initial output arguments will be populated with an @@ -194,7 +194,7 @@ const struct got_error *got_diff_tree_compute_diffstat /* * Diff two objects, assuming both objects are blobs. Two const char * diff * header labels may be provided which will be used to identify each blob in - * the diff output. If a label is NULL, use the blob's SHA1 checksum instead. + * the diff output. If a label is NULL, use the blob's hash instead. * Two open temporary files and two temporary file descriptors must be * provided for internal use; these files can be obtained from * got_opentemp() and got_opentempfd(), and must be closed by the caller. @@ -216,7 +216,7 @@ struct got_pathlist_head; /* * Diff two objects, assuming both objects are trees. Two const char * diff * header labels may be provided which will be used to identify each blob in - * the trees. If a label is NULL, use the blob's SHA1 checksum instead. + * the trees. If a label is NULL, use the blob's hash instead. * The number of context lines to show in diffs must be specified. * Two open temporary files and two temporary file descriptors must be * provided for internal use; these files can be obtained from blob - 84bb15514c656e502ae8af2671a92fe155d3d7ff blob + a29bb730648fceee2b224455f494b27194c64404 --- include/got_object.h +++ include/got_object.h @@ -86,7 +86,7 @@ struct got_repository; /* * Obtain a string representation of an object ID. The output depends on - * the hash function used by the repository format (currently SHA1). + * the hash function used by the repository format. */ const struct got_error *got_object_id_str(char **, struct got_object_id *); blob - 7175f86e3c1f00b9b4d870af1638dc3f1068d951 blob + a1bb191618ec66c76deecf76d52349088c755a06 --- include/got_repository_admin.h +++ include/got_repository_admin.h @@ -27,7 +27,7 @@ typedef const struct got_error *(*got_pack_progress_cb * already packed in another packfile. Otherwise, add only loose * objects to the new pack file. * Return an open file handle for the generated pack file. - * Return the SHA1 digest of the resulting pack file in pack_hash which + * Return the hash digest of the resulting pack file in pack_hash which * must freed by the caller when done. */ const struct got_error * blob - 374e644c5f8bf340e2ac98aca1d0228ccc0f2a75 blob + ae9d64d80a9440482ebd84e9541f0a1a20db7fb0 --- lib/got_lib_pack.h +++ lib/got_lib_pack.h @@ -78,9 +78,9 @@ struct got_packidx_v2_hdr { /* * Each entry N in the fanout table contains the number of objects in - * the packfile whose SHA1 begins with a byte less than or equal to N. + * the packfile whose hash begins with a byte less than or equal to N. * The last entry (index 255) contains the number of objects in the - * pack file whose first SHA1 byte is <= 0xff, and thus records the + * pack file whose first hash byte is <= 0xff, and thus records the * total number of objects in the pack file. All pointer variables * below point to tables with a corresponding number of entries. */