]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sha1-name.c
sha1-name.c: add repo_for_each_abbrev()
[thirdparty/git.git] / sha1-name.c
index a75992eb54242e3145392109aee7af68077776ab..cdcf84b826234d92f057305e2431a6d9b609202d 100644 (file)
@@ -493,13 +493,14 @@ static enum get_oid_result get_short_oid(const char *name, int len,
        return status;
 }
 
-int for_each_abbrev(const char *prefix, each_abbrev_fn fn, void *cb_data)
+int repo_for_each_abbrev(struct repository *r, const char *prefix,
+                        each_abbrev_fn fn, void *cb_data)
 {
        struct oid_array collect = OID_ARRAY_INIT;
        struct disambiguate_state ds;
        int ret;
 
-       if (init_object_disambiguation(the_repository, prefix, strlen(prefix), &ds) < 0)
+       if (init_object_disambiguation(r, prefix, strlen(prefix), &ds) < 0)
                return -1;
 
        ds.always_call_fn = 1;