summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 7cf2953eff..32f4f6cb89 100644
--- a/git.c
+++ b/git.c
@@ -290,7 +290,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
if (!help) {
if (p->option & RUN_SETUP)
prefix = setup_git_directory();
- if (p->option & RUN_SETUP_GENTLY) {
+ else if (p->option & RUN_SETUP_GENTLY) {
int nongit_ok;
prefix = setup_git_directory_gently(&nongit_ok);
}