refs/ref-cache.h: add missing declarations (hdr-check)
[gitweb.git] / remote.c
index 9a079517691331fae9cfc46d796c2d296081a7cc..682f2a01f949ce942597a9190cecfc991db0108e 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -1389,7 +1389,7 @@ void set_ref_status_for_push(struct ref *remote_refs, int send_mirror,
 
                ref->deletion = is_null_oid(&ref->new_oid);
                if (!ref->deletion &&
-                       !oidcmp(&ref->old_oid, &ref->new_oid)) {
+                       oideq(&ref->old_oid, &ref->new_oid)) {
                        ref->status = REF_STATUS_UPTODATE;
                        continue;
                }
@@ -1404,7 +1404,7 @@ void set_ref_status_for_push(struct ref *remote_refs, int send_mirror,
                 * branch.
                 */
                if (ref->expect_old_sha1) {
-                       if (oidcmp(&ref->old_oid, &ref->old_oid_expect))
+                       if (!oideq(&ref->old_oid, &ref->old_oid_expect))
                                reject_reason = REF_STATUS_REJECT_STALE;
                        else
                                /* If the ref isn't stale then force the update. */
@@ -2001,7 +2001,7 @@ struct ref *guess_remote_head(const struct ref *head,
        /* If refs/heads/master could be right, it is. */
        if (!all) {
                r = find_ref_by_name(refs, "refs/heads/master");
-               if (r && !oidcmp(&r->old_oid, &head->old_oid))
+               if (r && oideq(&r->old_oid, &head->old_oid))
                        return copy_ref(r);
        }
 
@@ -2009,7 +2009,7 @@ struct ref *guess_remote_head(const struct ref *head,
        for (r = refs; r; r = r->next) {
                if (r != head &&
                    starts_with(r->name, "refs/heads/") &&
-                   !oidcmp(&r->old_oid, &head->old_oid)) {
+                   oideq(&r->old_oid, &head->old_oid)) {
                        *tail = copy_ref(r);
                        tail = &((*tail)->next);
                        if (!all)