t/helper: add a test helper to compute hash speed
[gitweb.git] / builtin / show-branch.c
index 363cf8509af5bf640da60c36118b841da06918fe..65f4a4c83c42ec33d5ffe3f1d83d7b5465c0796d 100644 (file)
@@ -412,7 +412,7 @@ static int append_head_ref(const char *refname, const struct object_id *oid,
        /* If both heads/foo and tags/foo exists, get_sha1 would
         * get confused.
         */
-       if (get_oid(refname + ofs, &tmp) || oidcmp(&tmp, oid))
+       if (get_oid(refname + ofs, &tmp) || !oideq(&tmp, oid))
                ofs = 5;
        return append_ref(refname + ofs, oid, 0);
 }
@@ -427,7 +427,7 @@ static int append_remote_ref(const char *refname, const struct object_id *oid,
        /* If both heads/foo and tags/foo exists, get_sha1 would
         * get confused.
         */
-       if (get_oid(refname + ofs, &tmp) || oidcmp(&tmp, oid))
+       if (get_oid(refname + ofs, &tmp) || !oideq(&tmp, oid))
                ofs = 5;
        return append_ref(refname + ofs, oid, 0);
 }
@@ -485,7 +485,7 @@ static void snarf_refs(int head, int remotes)
 static int rev_is_head(const char *head, const char *name,
                       unsigned char *head_sha1, unsigned char *sha1)
 {
-       if (!head || (head_sha1 && sha1 && hashcmp(head_sha1, sha1)))
+       if (!head || (head_sha1 && sha1 && !hasheq(head_sha1, sha1)))
                return 0;
        skip_prefix(head, "refs/heads/", &head);
        if (!skip_prefix(name, "refs/heads/", &name))