]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs/files-backend.c
convert "oidcmp() != 0" to "!oideq()"
[thirdparty/git.git] / refs / files-backend.c
index 1f1a98e4cb0610039e66f24dab59205377d90144..16ef9325e0d9985c36fd525016340246caaa1af8 100644 (file)
@@ -841,7 +841,7 @@ static int verify_lock(struct ref_store *ref_store, struct ref_lock *lock,
                        return 0;
                }
        }
-       if (old_oid && oidcmp(&lock->old_oid, old_oid)) {
+       if (old_oid && !oideq(&lock->old_oid, old_oid)) {
                strbuf_addf(err, "ref '%s' is at %s but expected %s",
                            lock->ref_name,
                            oid_to_hex(&lock->old_oid),
@@ -2307,7 +2307,7 @@ static int check_old_oid(struct ref_update *update, struct object_id *oid,
                         struct strbuf *err)
 {
        if (!(update->flags & REF_HAVE_OLD) ||
-                  !oidcmp(oid, &update->old_oid))
+                  oideq(oid, &update->old_oid))
                return 0;
 
        if (is_null_oid(&update->old_oid))
@@ -2443,7 +2443,7 @@ static int lock_ref_for_update(struct files_ref_store *refs,
            !(update->flags & REF_DELETING) &&
            !(update->flags & REF_LOG_ONLY)) {
                if (!(update->type & REF_ISSYMREF) &&
-                   !oidcmp(&lock->old_oid, &update->new_oid)) {
+                   oideq(&lock->old_oid, &update->new_oid)) {
                        /*
                         * The reference already has the desired
                         * value, so we don't need to write it.