use oid_to_hex_r() for converting struct object_id hashes to hex strings
Patch generated by Coccinelle and contrib/coccinelle/object_id.cocci. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
4e59582ff7
commit
2490574d15
2
diff.c
2
diff.c
@ -3015,7 +3015,7 @@ static struct diff_tempfile *prepare_temp_file(const char *name,
|
||||
if (!one->oid_valid)
|
||||
sha1_to_hex_r(temp->hex, null_sha1);
|
||||
else
|
||||
sha1_to_hex_r(temp->hex, one->oid.hash);
|
||||
oid_to_hex_r(temp->hex, &one->oid);
|
||||
/* Even though we may sometimes borrow the
|
||||
* contents from the work tree, we always want
|
||||
* one->mode. mode is trustworthy even when
|
||||
|
||||
Reference in New Issue
Block a user