diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2019-02-19 00:05:03 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-01 11:57:38 +0900 |
commit | 538b1523246ba0845564a6b703c6e4ff1921c16a (patch) | |
tree | 3324f6a9eaa2aa89e240fc8535c4ab04950b54bd /packfile.c | |
parent | 0dbc6462ee8853da1ecca7b50cd0c0c9bc62e25b (diff) | |
download | git-538b1523246ba0845564a6b703c6e4ff1921c16a.tar.gz |
object-store: rename and expand packed_git's sha1 member
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".
This transformation was made with a change to the definition and the
following semantic patch:
@@
struct packed_git *E1;
@@
- E1->sha1
+ E1->hash
@@
struct packed_git E1;
@@
- E1.sha1
+ E1.hash
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packfile.c b/packfile.c index 16bcb75262..e6e8861650 100644 --- a/packfile.c +++ b/packfile.c @@ -235,7 +235,7 @@ struct packed_git *parse_pack_index(unsigned char *sha1, const char *idx_path) struct packed_git *p = alloc_packed_git(alloc); memcpy(p->pack_name, path, alloc); /* includes NUL */ - hashcpy(p->sha1, sha1); + hashcpy(p->hash, sha1); if (check_packed_git_idx(idx_path, p)) { free(p); return NULL; @@ -722,8 +722,8 @@ struct packed_git *add_packed_git(const char *path, size_t path_len, int local) p->pack_local = local; p->mtime = st.st_mtime; 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); return p; } |