diff --git a/stagit-index.c b/stagit-index.c index 26ef16d..735775b 100644 --- a/stagit-index.c +++ b/stagit-index.c @@ -188,6 +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, ""); + /* do not require the git repository to be owned by the current user */ + git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); #ifdef __OpenBSD__ if (pledge("stdio rpath", NULL) == -1) diff --git a/stagit.c b/stagit.c index 54622a1..2a9c3fe 100644 --- a/stagit.c +++ b/stagit.c @@ -1235,6 +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, ""); + /* do not require the git repository to be owned by the current user */ + git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); #ifdef __OpenBSD__ if (unveil(repodir, "r") == -1)