diff options
Diffstat (limited to 't/helper')
-rw-r--r-- | t/helper/test-reach.c | 2 | ||||
-rw-r--r-- | t/helper/test-ref-store.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c index 119f4908cf..3e173399a0 100644 --- a/t/helper/test-reach.c +++ b/t/helper/test-reach.c @@ -138,7 +138,7 @@ int cmd__reach(int ac, const char **av) printf("%s(X,_,_,0,0):%d\n", av[1], can_all_from_reach_with_flag(&X_obj, 2, 4, 0, 0)); } else if (!strcmp(av[1], "commit_contains")) { - struct ref_filter filter; + struct ref_filter filter = REF_FILTER_INIT; struct contains_cache cache; init_contains_cache(&cache); diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index fb18831ec2..13865425dd 100644 --- a/t/helper/test-ref-store.c +++ b/t/helper/test-ref-store.c @@ -186,6 +186,15 @@ static int cmd_for_each_ref(struct ref_store *refs, const char **argv) return refs_for_each_ref_in(refs, prefix, each_ref, NULL); } +static int cmd_for_each_ref__exclude(struct ref_store *refs, const char **argv) +{ + const char *prefix = notnull(*argv++, "prefix"); + const char **exclude_patterns = argv; + + return refs_for_each_fullref_in(refs, prefix, exclude_patterns, each_ref, + NULL); +} + static int cmd_resolve_ref(struct ref_store *refs, const char **argv) { struct object_id oid = *null_oid(); @@ -318,6 +327,7 @@ static struct command commands[] = { { "delete-refs", cmd_delete_refs }, { "rename-ref", cmd_rename_ref }, { "for-each-ref", cmd_for_each_ref }, + { "for-each-ref--exclude", cmd_for_each_ref__exclude }, { "resolve-ref", cmd_resolve_ref }, { "verify-ref", cmd_verify_ref }, { "for-each-reflog", cmd_for_each_reflog }, |