dir: fix treatment of negated pathspecs
[git/raj.git] / t / helper / test-genzeros.c
blob9532f5bac97687c3736a9754e60330475fbb32ab
1 #include "test-tool.h"
2 #include "git-compat-util.h"
4 int cmd__genzeros(int argc, const char **argv)
6 long count;
8 if (argc > 2) {
9 fprintf(stderr, "usage: %s [<count>]\n", argv[0]);
10 return 1;
13 count = argc > 1 ? strtol(argv[1], NULL, 0) : -1L;
15 while (count < 0 || count--) {
16 if (putchar(0) == EOF)
17 return -1;
20 return 0;