stagit
static git repository generator
git clone https://9o.is/git/stagit.git
commit 6db146c9002cd977caeb5986765d54803ef14710 parent 5850419ba3f7abd6d4b24e123d41e55cfc56816a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 24 May 2022 14:07:27 +0200 remain compatible with slightly older libgit versions for now Diffstat:
| M | stagit-index.c | | | 2 | ++ |
| M | stagit.c | | | 2 | ++ |
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/stagit-index.c b/stagit-index.c @@ -188,8 +188,10 @@ main(int argc, char *argv[]) git_libgit2_init(); for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++) git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, ""); +#ifdef GIT_OPT_SET_OWNER_VALIDATION /* do not require the git repository to be owned by the current user */ git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); +#endif #ifdef __OpenBSD__ if (pledge("stdio rpath", NULL) == -1) diff --git a/stagit.c b/stagit.c @@ -1235,8 +1235,10 @@ main(int argc, char *argv[]) git_libgit2_init(); for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++) git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, ""); +#ifdef GIT_OPT_SET_OWNER_VALIDATION /* do not require the git repository to be owned by the current user */ git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); +#endif #ifdef __OpenBSD__ if (unveil(repodir, "r") == -1)