On Mon, Feb 11, 2019 at 8:23 PM brian m. carlson
<[email protected]> wrote:
> This member is used to represent the pack checksum of the pack in
> question. Expand this member to be GIT_MAX_RAWSZ bytes in length so it
> works with longer hashes and rename it to be "hash" instead of "sha1".
> [...]
> Signed-off-by: brian m. carlson <[email protected]>
> ---
> diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
> @@ -689,7 +689,7 @@ int cmd_pack_redundant(int argc, const char **argv, const
> char *prefix)
> while (pl) {
> printf("%s\n%s\n",
> - sha1_pack_index_name(pl->pack->sha1),
> + sha1_pack_index_name(pl->pack->hash),
I guess there is no oid_pack_index_name() function yet?
> diff --git a/http-walker.c b/http-walker.c
> @@ -434,7 +434,7 @@ static int http_fetch_pack(struct walker *walker, struct
> alt_base *repo, unsigne
> if (walker->get_verbosely) {
> fprintf(stderr, "Getting pack %s\n",
> - sha1_to_hex(target->sha1));
> + sha1_to_hex(target->hash));
Should this have become oid_to_hex()?
> fprintf(stderr, " which contains %s\n",
> sha1_to_hex(sha1));
The patch isn't touching this sha1 yet, so this is okay(?).
> diff --git a/http.c b/http.c
> @@ -2262,10 +2262,10 @@ struct http_pack_request *new_http_pack_request(
> strbuf_addf(&buf, "objects/pack/pack-%s.pack",
> - sha1_to_hex(target->sha1));
> + sha1_to_hex(target->hash));
oid_to_hex()?
> @@ -2289,7 +2289,8 @@ struct http_pack_request *new_http_pack_request(
> fprintf(stderr,
> "Resuming fetch of pack %s at byte
> %"PRIuMAX"\n",
> - sha1_to_hex(target->sha1),
> (uintmax_t)prev_posn);
> + sha1_to_hex(target->hash),
oid_to_hex()?
> diff --git a/packfile.c b/packfile.c
> @@ -722,8 +722,8 @@ struct packed_git *add_packed_git(const char *path,
> size_t path_len, int local)
> if (path_len < the_hash_algo->hexsz ||
> - get_sha1_hex(path + path_len - the_hash_algo->hexsz, p->sha1))
> - hashclr(p->sha1);
> + get_sha1_hex(path + path_len - the_hash_algo->hexsz, p->hash))
> + hashclr(p->hash);
get_oid_hex()?