stagit-index: pledge after git_libgit2_init

This commit is contained in:
Hiltjo Posthuma 2018-04-06 19:28:05 +02:00
parent 3c07e52f98
commit 6a1224afae

View file

@ -157,15 +157,16 @@ main(int argc, char *argv[])
const char *repodir;
int i, ret = 0;
if (pledge("stdio rpath", NULL) == -1)
err(1, "pledge");
if (argc < 2) {
fprintf(stderr, "%s [repodir...]\n", argv[0]);
return 1;
}
git_libgit2_init();
if (pledge("stdio rpath", NULL) == -1)
err(1, "pledge");
writeheader(stdout);
for (i = 1; i < argc; i++) {