summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2017-05-30 10:30:52 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-02 09:36:07 +0900
commit74014152be5d4280b1f8541cbae09b441d2c5328 (patch)
treeec462eb8372d75bb9aef59318ae3c7cf267be8b3 /diff.c
parentdiff: convert reuse_worktree_file to struct object_id (diff)
downloadtgif-74014152be5d4280b1f8541cbae09b441d2c5328.tar.xz
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 084c8b2d0a..a8ceeb024c 100644
--- a/diff.c
+++ b/diff.c
@@ -3030,13 +3030,13 @@ static struct diff_tempfile *prepare_temp_file(const char *name,
/* we can borrow from the file in the work tree */
temp->name = name;
if (!one->oid_valid)
- sha1_to_hex_r(temp->hex, null_sha1);
+ oid_to_hex_r(temp->hex, &null_oid);
else
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
- * !(one->sha1_valid), as long as
+ * !(one->oid_valid), as long as
* DIFF_FILE_VALID(one).
*/
xsnprintf(temp->mode, sizeof(temp->mode), "%06o", one->mode);