Thread (27 messages) 27 messages, 1 author, 2016-06-15

[WIP PATCH 13/26] USE_PAGER should not be used without RUN_SETUP*

DORMANTno replies

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:48:17
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 git.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/git.c b/git.c
index 3462b49..1d1ad1a 100644
--- a/git.c
+++ b/git.c
@@ -266,8 +266,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
 
 		if (use_pager == -1 && p->option & RUN_SETUP)
 			use_pager = check_pager_config(p->cmd);
-		if (use_pager == -1 && p->option & USE_PAGER)
+		if (use_pager == -1 && p->option & USE_PAGER) {
+			if ((p->option & (RUN_SETUP | RUN_SETUP_GENTLY)) == 0)
+				die("Internal error: USE_PAGER must be together with RUN_SETUP*");
 			use_pager = 1;
+		}
 	}
 	commit_pager_choice();
 
-- 
1.7.0.195.g637a2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help