Revert "remain compatible with slightly older libgit versions for now"

This reverts commit 70541c5e2c.

Reported by Anton:
The last commit[1] is not correct as GIT_OPT_SET_OWNER_VALIDATION is not
a preprocessor directive but rather an enum. Causing the branch to never
be entered.
This commit is contained in:
Hiltjo Posthuma 2022-05-27 21:29:14 +02:00
parent 70541c5e2c
commit 2890451154
2 changed files with 0 additions and 4 deletions

View File

@ -188,10 +188,8 @@ 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)

View File

@ -1235,10 +1235,8 @@ 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)