diff options
Diffstat (limited to 'builtin/name-rev.c')
-rw-r--r-- | builtin/name-rev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 9736d4452f..41bdf0a8aa 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -305,6 +305,8 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix) struct object_array revs = OBJECT_ARRAY_INIT; int all = 0, transform_stdin = 0, allow_undefined = 1, always = 0, peel_tag = 0; struct name_ref_data data = { 0, 0, NULL }; + struct each_ref_fn_sha1_adapter wrapped_name_ref = + {name_ref, &data}; struct option opts[] = { OPT_BOOL(0, "name-only", &data.name_only, N_("print only names (no SHA-1)")), OPT_BOOL(0, "tags", &data.tags_only, N_("only use tags to name the commits")), @@ -377,7 +379,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix) if (cutoff) cutoff = cutoff - CUTOFF_DATE_SLOP; - for_each_ref(name_ref, &data); + for_each_ref(each_ref_fn_adapter, &wrapped_name_ref); if (transform_stdin) { char buffer[2048]; |