stagit-index: pledge after git_libgit2_init
1 files changed, 4 insertions(+), 3 deletions(-) | |||
---|---|---|---|
M | stagit-index.c | +4 | -3 |
1@@ -157,15 +157,16 @@ main(int argc, char *argv[])
2 const char *repodir;
3 int i, ret = 0;
4
5- if (pledge("stdio rpath", NULL) == -1)
6- err(1, "pledge");
7-
8 if (argc < 2) {
9 fprintf(stderr, "%s [repodir...]\n", argv[0]);
10 return 1;
11 }
12+
13 git_libgit2_init();
14
15+ if (pledge("stdio rpath", NULL) == -1)
16+ err(1, "pledge");
17+
18 writeheader(stdout);
19
20 for (i = 1; i < argc; i++) {