From: Junio C Hamano Date: Tue, 28 Feb 2012 18:13:48 GMT Subject: Re: [PATCH v7 02/10] Stop starting pager recursively Message-ID: <7v4nua25cz.fsf@alter.siamese.dyndns.org> In-Reply-To: <1330430331-19945-3-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > 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. A natural question that may come after reading only the above is if "git column" is the only one that has this problem. In other words, is the undesirable behaviour you observed caused by a bug in setup_pager() that needs to be fixed, or should it be fixed in "git column"? > Signed-off-by: Nguyễn Thái Ngọc Duy > Signed-off-by: Junio C Hamano > --- > pager.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/pager.c b/pager.c > index 05584de..4dcb08d 100644 > --- a/pager.c > +++ b/pager.c > @@ -73,7 +73,7 @@ void setup_pager(void) > { > const char *pager = git_pager(isatty(1)); > > - if (!pager) > + if (!pager || pager_in_use()) > return; > > /*