]> git.ipfire.org Git - thirdparty/git.git/blob - t/helper/test-genzeros.c
Merge branch 'dl/reset-doc-no-wrt-abbrev'
[thirdparty/git.git] / t / helper / test-genzeros.c
1 #include "test-tool.h"
2 #include "git-compat-util.h"
3
4 int cmd__genzeros(int argc, const char **argv)
5 {
6 long count;
7
8 if (argc > 2) {
9 fprintf(stderr, "usage: %s [<count>]\n", argv[0]);
10 return 1;
11 }
12
13 count = argc > 1 ? strtol(argv[1], NULL, 0) : -1L;
14
15 while (count < 0 || count--) {
16 if (putchar(0) == EOF)
17 return -1;
18 }
19
20 return 0;
21 }