diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-05-10 16:59:46 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-05-10 16:59:46 +0900 |
| commit | aaa3c8065d86e8f25850eb79e90da68d6adcf03f (patch) | |
| tree | ac8883284fe2e056252c14f6916e5ee9312eff1a /diff.c | |
| parent | The fourteenth batch (diff) | |
| parent | hex: print objects using the hash algorithm member (diff) | |
| download | git-aaa3c8065d86e8f25850eb79e90da68d6adcf03f.tar.gz git-aaa3c8065d86e8f25850eb79e90da68d6adcf03f.zip | |
Merge branch 'bc/hash-transition-interop-part-1'
SHA-256 transition.
* bc/hash-transition-interop-part-1:
hex: print objects using the hash algorithm member
hex: default to the_hash_algo on zero algorithm value
builtin/pack-objects: avoid using struct object_id for pack hash
commit-graph: don't store file hashes as struct object_id
builtin/show-index: set the algorithm for object IDs
hash: provide per-algorithm null OIDs
hash: set, copy, and use algo field in struct object_id
builtin/pack-redundant: avoid casting buffers to struct object_id
Use the final_oid_fn to finalize hashing of object IDs
hash: add a function to finalize object IDs
http-push: set algorithm when reading object ID
Always use oidread to read into struct object_id
hash: add an algo member to struct object_id
Diffstat (limited to 'diff.c')
| -rw-r--r-- | diff.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4190,7 +4190,7 @@ static struct diff_tempfile *prepare_temp_file(struct repository *r, die_errno("readlink(%s)", name); prep_temp_blob(r->index, name, temp, sb.buf, sb.len, (one->oid_valid ? - &one->oid : &null_oid), + &one->oid : null_oid()), (one->oid_valid ? one->mode : S_IFLNK)); strbuf_release(&sb); @@ -4199,7 +4199,7 @@ static struct diff_tempfile *prepare_temp_file(struct repository *r, /* we can borrow from the file in the work tree */ temp->name = name; if (!one->oid_valid) - oid_to_hex_r(temp->hex, &null_oid); + oid_to_hex_r(temp->hex, null_oid()); else oid_to_hex_r(temp->hex, &one->oid); /* Even though we may sometimes borrow the @@ -6234,7 +6234,7 @@ static int diff_get_patch_id(struct diff_options *options, struct object_id *oid } if (!stable) - the_hash_algo->final_fn(oid->hash, &ctx); + the_hash_algo->final_oid_fn(oid, &ctx); return 0; } |
