]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/remote.c
The first batch after 2.22
[thirdparty/git.git] / builtin / remote.c
index 5fd1012faaeceaa0d8db18c3a15310b0d8570043..5591cef775432d2bd01b866183e789952ad36915 100644 (file)
@@ -10,6 +10,7 @@
 #include "refspec.h"
 #include "object-store.h"
 #include "argv-array.h"
+#include "commit-reach.h"
 
 static const char * const builtin_remote_usage[] = {
        N_("git remote [-v | --verbose]"),
@@ -412,7 +413,7 @@ static int get_push_ref_states(const struct ref *remote_refs,
 
                if (is_null_oid(&ref->new_oid)) {
                        info->status = PUSH_STATUS_DELETE;
-               } else if (!oidcmp(&ref->old_oid, &ref->new_oid))
+               } else if (oideq(&ref->old_oid, &ref->new_oid))
                        info->status = PUSH_STATUS_UPTODATE;
                else if (is_null_oid(&ref->old_oid))
                        info->status = PUSH_STATUS_CREATE;
@@ -1406,7 +1407,7 @@ static int update(int argc, const char **argv)
        return retval;
 }
 
-static int remove_all_fetch_refspecs(const char *remote, const char *key)
+static int remove_all_fetch_refspecs(const char *key)
 {
        return git_config_set_multivar_gently(key, NULL, NULL, 1);
 }
@@ -1436,7 +1437,7 @@ static int set_remote_branches(const char *remotename, const char **branches,
        if (!remote_is_configured(remote, 1))
                die(_("No such remote '%s'"), remotename);
 
-       if (!add_mode && remove_all_fetch_refspecs(remotename, key.buf)) {
+       if (!add_mode && remove_all_fetch_refspecs(key.buf)) {
                strbuf_release(&key);
                return 1;
        }