git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
eab8bf2
)
read-cache: convert to struct object_id
author
Patryk Obara
<redacted>
Sun, 20 Aug 2017 20:09:27 +0000
(22:09 +0200)
committer
Junio C Hamano
<redacted>
Mon, 21 Aug 2017 04:51:08 +0000
(21:51 -0700)
Replace hashcmp with oidcmp.
Signed-off-by: Patryk Obara <redacted>
Signed-off-by: Junio C Hamano <redacted>
read-cache.c
patch
|
blob
|
history
diff --git
a/read-cache.c
b/read-cache.c
index acfb028f480b5545aa82d5c0533fe8bdfc581dfd..72856085f26c3816dba859c57f5f33d703337374 100644
(file)
--- a/
read-cache.c
+++ b/
read-cache.c
@@
-160,9
+160,9
@@
static int ce_compare_data(const struct cache_entry *ce, struct stat *st)
int fd = git_open_cloexec(ce->name, O_RDONLY);
if (fd >= 0) {
-
unsigned char sha1[20]
;
- if (!index_fd(
sha1
, fd, st, OBJ_BLOB, ce->name, 0))
- match =
hashcmp(sha1, ce->oid.hash
);
+
struct object_id oid
;
+ if (!index_fd(
oid.hash
, fd, st, OBJ_BLOB, ce->name, 0))
+ match =
oidcmp(&oid, &ce->oid
);
/* index_fd() closed the file descriptor already */
}
return match;
git clone https://git.99rst.org/PROJECT