diff options
Diffstat (limited to 'builtin/show-ref.c')
-rw-r--r-- | builtin/show-ref.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 839a5c29f3..285cd3e433 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -1,3 +1,4 @@ +#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "config.h" #include "gettext.h" @@ -63,7 +64,7 @@ struct show_ref_data { int show_head; }; -static int show_ref(const char *refname, const struct object_id *oid, +static int show_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, int flag UNUSED, void *cbdata) { struct show_ref_data *data = cbdata; @@ -97,6 +98,7 @@ match: } static int add_existing(const char *refname, + const char *referent UNUSED, const struct object_id *oid UNUSED, int flag UNUSED, void *cbdata) { @@ -286,15 +288,18 @@ static int exclude_existing_callback(const struct option *opt, const char *arg, return 0; } -int cmd_show_ref(int argc, const char **argv, const char *prefix) +int cmd_show_ref(int argc, +const char **argv, +const char *prefix, +struct repository *repo UNUSED) { struct exclude_existing_options exclude_existing_opts = {0}; struct patterns_options patterns_opts = {0}; struct show_one_options show_one_opts = {0}; int verify = 0, exists = 0; const struct option show_ref_options[] = { - OPT_BOOL(0, "tags", &patterns_opts.tags_only, N_("only show tags (can be combined with branches)")), - OPT_BOOL(0, "branches", &patterns_opts.branches_only, N_("only show branches (can be combined with tags)")), + OPT_BOOL(0, "tags", &patterns_opts.tags_only, N_("only show tags (can be combined with --branches)")), + OPT_BOOL(0, "branches", &patterns_opts.branches_only, N_("only show branches (can be combined with --tags)")), OPT_HIDDEN_BOOL(0, "heads", &patterns_opts.branches_only, N_("deprecated synonym for --branches")), OPT_BOOL(0, "exists", &exists, N_("check for reference existence without resolving")), |