diff options
Diffstat (limited to 'builtin/name-rev.c')
| -rw-r--r-- | builtin/name-rev.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 70e9ec4e47..beac166b5c 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -1,8 +1,10 @@ +#define USE_THE_REPOSITORY_VARIABLE +#define DISABLE_SIGN_COMPARE_WARNINGS + #include "builtin.h" #include "environment.h" #include "gettext.h" #include "hex.h" -#include "repository.h" #include "config.h" #include "commit.h" #include "tag.h" @@ -65,7 +67,7 @@ static void set_commit_cutoff(struct commit *commit) static void adjust_cutoff_timestamp_for_slop(void) { if (cutoff) { - /* check for undeflow */ + /* check for underflow */ if (cutoff > TIME_MIN + CUTOFF_DATE_SLOP) cutoff = cutoff - CUTOFF_DATE_SLOP; else @@ -337,7 +339,7 @@ static int cmp_by_tag_and_age(const void *a_, const void *b_) return a->taggerdate != b->taggerdate; } -static int name_ref(const char *path, const struct object_id *oid, +static int name_ref(const char *path, const char *referent UNUSED, const struct object_id *oid, int flags UNUSED, void *cb_data) { struct object *o = parse_object(the_repository, oid); @@ -558,7 +560,10 @@ static void name_rev_line(char *p, struct name_ref_data *data) strbuf_release(&buf); } -int cmd_name_rev(int argc, const char **argv, const char *prefix) +int cmd_name_rev(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { struct mem_pool string_pool; struct object_array revs = OBJECT_ARRAY_INIT; @@ -677,7 +682,9 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix) always, allow_undefined, data.name_only); } - UNLEAK(string_pool); - UNLEAK(revs); + string_list_clear(&data.ref_filters, 0); + string_list_clear(&data.exclude_filters, 0); + mem_pool_discard(&string_pool, 0); + object_array_clear(&revs); return 0; } |
