[PATCH v4 05/13] Stop starting pager recursively
- From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
- Date
- Feb 3, 2012, 13:34 UTC
- Message-ID
- <1328276078-27955-6-git-send-email-pclouds@gmail.com>
- In-Reply-To
- <1328276078-27955-1-git-send-email-pclouds@gmail.com>
git-column can be used as a pager for other git commands, something like this:
GIT_PAGER="git -p column --mode='dense color'" git -p branch
The problem with this is that "git -p column" also has $GIT_PAGER set so the pager runs itself again as a pager, then again and again.
Stop this.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- pager.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pager.c b/pager.c index 772a5a6..e4353dc 100644 --- a/pager.c +++ b/pager.c @@ -89,7 +89,7 @@ void setup_pager(void) const char *pager = git_pager(isatty(1)); int width; - if (!pager) + if (!pager || pager_in_use()) return; setenv("GIT_PAGER_IN_USE", "true", 1);
-- 1.7.8.36.g69ee2