diff options
author | Jeff King <peff@peff.net> | 2018-08-29 00:22:52 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-29 21:32:49 +0300 |
commit | 67947c34ae8f666e72b9406a38984fe8386f5e50 (patch) | |
tree | c9ae21d6995cf9011777cb9d336bfa14f4587fc5 /commit-graph.c | |
parent | 9001dc2a7493f1366a183c3a9175f608769321d5 (diff) |
convert "hashcmp() != 0" to "!hasheq()"
This rounds out the previous three patches, covering the
inequality logic for the "hash" variant of the functions.
As with the previous three, the accompanying code changes
are the mechanical result of applying the coccinelle patch;
see those patches for more discussion.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commit-graph.c b/commit-graph.c index 7aed9f5371..64ce79420d 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -900,7 +900,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g) f = hashfd(devnull, NULL); hashwrite(f, g->data, g->data_len - g->hash_len); finalize_hashfile(f, checksum.hash, CSUM_CLOSE); - if (hashcmp(checksum.hash, g->data + g->data_len - g->hash_len)) { + if (!hasheq(checksum.hash, g->data + g->data_len - g->hash_len)) { graph_report(_("the commit-graph file has incorrect checksum and is likely corrupt")); verify_commit_graph_error = VERIFY_COMMIT_GRAPH_ERROR_HASH; } |