2 #include "parse-options.h"
6 int cmd__parse_pathspec_file(int argc, const char **argv)
8 struct pathspec pathspec;
9 const char *pathspec_from_file = 0;
10 int pathspec_file_nul = 0, i;
12 static const char *const usage[] = {
13 "test-tool parse-pathspec-file --pathspec-from-file [--pathspec-file-nul]",
17 struct option options[] = {
18 OPT_PATHSPEC_FROM_FILE(&pathspec_from_file),
19 OPT_PATHSPEC_FILE_NUL(&pathspec_file_nul),
23 parse_options(argc, argv, 0, options, usage, 0);
25 parse_pathspec_file(&pathspec, 0, 0, 0, pathspec_from_file,
28 for (i = 0; i < pathspec.nr; i++)
29 printf("%s\n", pathspec.items[i].original);
31 clear_pathspec(&pathspec);