git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive
@ 2014-04-22  0:47 Luis R. Rodriguez
  2014-04-22 19:37 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Luis R. Rodriguez @ 2014-04-22  0:47 UTC (permalink / raw)
  To: git; +Cc: Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This saves us a few branches when RUN_SETUP is set up.

Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
 git.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git.c b/git.c
index 9efd1a3..7780572 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);
 		}
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-22 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22  0:47 [PATCH] git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive Luis R. Rodriguez
2014-04-22 19:37 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).