diff options
Diffstat (limited to 'sha1-name.c')
-rw-r--r-- | sha1-name.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sha1-name.c b/sha1-name.c index a75992eb54..cdcf84b826 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -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; |