summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-02 00:26:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-02 04:59:52 (GMT)
commita0554934364f3c8921abb8f7526301e81c230dac (patch)
treed38150351e7016c712760f60cfcdc1acd03ab8ed /cache-tree.c
parent62ba93eaa9dfac60c17e362220b3f1dd183bf5ac (diff)
downloadgit-a0554934364f3c8921abb8f7526301e81c230dac.zip
git-a0554934364f3c8921abb8f7526301e81c230dac.tar.gz
git-a0554934364f3c8921abb8f7526301e81c230dac.tar.bz2
cache-tree: use is_empty_tree_oid
When comparing an object ID against that of the empty tree, use the is_empty_tree_oid function to ensure that we abstract over the hash algorithm properly. In addition, this is more readable than a plain oidcmp. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c
index 8c7e125..2566382 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -385,7 +385,7 @@ static int update_one(struct cache_tree *it,
/*
* "sub" can be an empty tree if all subentries are i-t-a.
*/
- if (contains_ita && !oidcmp(oid, &empty_tree_oid))
+ if (contains_ita && is_empty_tree_oid(oid))
continue;
strbuf_grow(&buffer, entlen + 100);