ctucx.git: stagit

ctucx' stagit fork

commit ff082027e5a3caa859e5fb8c617f8ef471828ce1
parent eff4b2a4c5585018eaf48d1eb07cee346000d2be
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 27 May 2022 21:29:14 +0200

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

This reverts commit 70541c5e2cbdc141ba94e76899aba5f07047cecf.

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.
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/stagit-index.c b/stagit-index.c
@@ -205,10 +205,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)
diff --git a/stagit.c b/stagit.c
@@ -1320,10 +1320,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)