diff options
author | Stefan Beller <sbeller@google.com> | 2018-08-20 18:24:19 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-21 10:22:50 -0700 |
commit | 212e0f7efe163d062dcd393a0788cf3f93544a6e (patch) | |
tree | 27a44ad4741b9d0b6ee56713a99affdc764bfaf2 /builtin/replace.c | |
parent | refs.c: migrate internal ref iteration to pass thru repository argument (diff) | |
download | tgif-212e0f7efe163d062dcd393a0788cf3f93544a6e.tar.xz |
refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/replace.c')
-rw-r--r-- | builtin/replace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/replace.c b/builtin/replace.c index e997a562f0..b5861a0ee9 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -39,7 +39,8 @@ struct show_data { enum replace_format format; }; -static int show_reference(const char *refname, const struct object_id *oid, +static int show_reference(struct repository *r, const char *refname, + const struct object_id *oid, int flag, void *cb_data) { struct show_data *data = cb_data; @@ -56,9 +57,8 @@ static int show_reference(const char *refname, const struct object_id *oid, if (get_oid(refname, &object)) return error("Failed to resolve '%s' as a valid ref.", refname); - obj_type = oid_object_info(the_repository, &object, - NULL); - repl_type = oid_object_info(the_repository, oid, NULL); + obj_type = oid_object_info(r, &object, NULL); + repl_type = oid_object_info(r, oid, NULL); printf("%s (%s) -> %s (%s)\n", refname, type_name(obj_type), oid_to_hex(oid), type_name(repl_type)); |