Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diff: finish conversion for prepare_temp_file to struct object_id
author
Brandon Williams
<bmwill@google.com>
Tue, 30 May 2017 17:30:52 +0000
(10:30 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 2 Jun 2017 00:36:07 +0000
(09:36 +0900)
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
fb4a1c0
)
diff --git
a/diff.c
b/diff.c
index 084c8b2d0a105f95fde776a44127b2cb7fb8452a..a8ceeb024c408b3fd2e0b605b2682369b81ca7f9 100644
(file)
--- 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)
/* 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
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);
* DIFF_FILE_VALID(one).
*/
xsnprintf(temp->mode, sizeof(temp->mode), "%06o", one->mode);