aboutsummaryrefslogtreecommitdiffstats
path: root/stagit.c
diff options
context:
space:
mode:
Diffstat (limited to 'stagit.c')
-rw-r--r--stagit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stagit.c b/stagit.c
index 22fc2aa..0d53b72 100644
--- a/stagit.c
+++ b/stagit.c
@@ -1220,7 +1220,11 @@ main(int argc, char *argv[])
if (!realpath(repodir, repodirabs))
err(1, "realpath");
+ /* do not search outside the git repository:
+ GIT_CONFIG_LEVEL_APP is the highest level currently */
git_libgit2_init();
+ for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++)
+ git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, "");
#ifdef __OpenBSD__
if (unveil(repodir, "r") == -1)