diff: finish conversion for prepare_temp_file to struct object_id
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams committed
May 30, 2017 at 10:30 UTC
74014152be5d4280b1f8541cbae09b441d2c5328
1 file changed
+2
-2
diff.c
+2
-2
@@ -3030,13 +3030,13 @@ static struct diff_tempfile *prepare_temp_file(const char *name,
3030
/* we can borrow from the file in the work tree */
3031
temp->name = name;
3032
if (!one->oid_valid)
3033
- sha1_to_hex_r(temp->hex, null_sha1);
3033
+ oid_to_hex_r(temp->hex, &null_oid);
3034
else
3035
oid_to_hex_r(temp->hex, &one->oid);
3036
/* Even though we may sometimes borrow the
3037
* contents from the work tree, we always want
3038
* one->mode. mode is trustworthy even when
3039
- * !(one->sha1_valid), as long as
3039
+ * !(one->oid_valid), as long as
3040
* DIFF_FILE_VALID(one).
3041
*/
3042
xsnprintf(temp->mode, sizeof(temp->mode), "%06o", one->mode);