diff options
Diffstat (limited to 't/helper/test-ref-store.c')
-rw-r--r-- | t/helper/test-ref-store.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index de4197708d..a6977b5e83 100644 --- a/t/helper/test-ref-store.c +++ b/t/helper/test-ref-store.c @@ -5,6 +5,7 @@ #include "worktree.h" #include "object-store.h" #include "repository.h" +#include "revision.h" struct flag_definition { const char *name; @@ -116,7 +117,14 @@ static struct flag_definition pack_flags[] = { FLAG_DEF(PACK_REFS_PRUNE), static int cmd_pack_refs(struct ref_store *refs, const char **argv) { unsigned int flags = arg_flags(*argv++, "flags", pack_flags); - struct pack_refs_opts pack_opts = { .flags = flags }; + static struct ref_exclusions exclusions = REF_EXCLUSIONS_INIT; + static struct string_list included_refs = STRING_LIST_INIT_NODUP; + struct pack_refs_opts pack_opts = { .flags = flags, + .exclusions = &exclusions, + .includes = &included_refs }; + + if (pack_opts.flags & PACK_REFS_ALL) + string_list_append(pack_opts.includes, "*"); return refs_pack_refs(refs, &pack_opts); } |