提交 27bd38d4 编写于 作者: L Luis R. Rodriguez 提交者: Junio C Hamano

git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive

This saves us a few branches when RUN_SETUP is set up.
Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 0bc85abb
...@@ -290,7 +290,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) ...@@ -290,7 +290,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
if (!help) { if (!help) {
if (p->option & RUN_SETUP) if (p->option & RUN_SETUP)
prefix = setup_git_directory(); prefix = setup_git_directory();
if (p->option & RUN_SETUP_GENTLY) { else if (p->option & RUN_SETUP_GENTLY) {
int nongit_ok; int nongit_ok;
prefix = setup_git_directory_gently(&nongit_ok); prefix = setup_git_directory_gently(&nongit_ok);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册