Re: [PATCH v7 02/10] Stop starting pager recursively
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Feb 29, 2012, 01:54 UTC
- Message-ID
- <CACsJy8DJM5hwWnTs2rkhCa7a=vKRRsLMjZGBotmDDpAaGG+Sxw@mail.gmail.com>
- In-Reply-To
- <7vipiqzsd8.fsf@alter.siamese.dyndns.org>
2012/2/29 Junio C Hamano <gitster@pobox.com>:
Show 22 quoted lines
>> 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"? > > Put another way, if there is another git command X that can be used as a > filter to the output of a git command Y, do you suffer from the same issue > to when you abuse the GIT_PAGER mechanism to pipe the output from Y to X? > That is a sure sign that the pager mechanism needs improvement (obviously, > an alternative answer could be "don't do that then", though). > > For example, shortlog is designed to be X for Y=log, i.e. > > $ git log v1.0.0.. | git shortlog > > is a perfectly valid way to use the command. I could imagine that this > patch may improve the situation if you abuse GIT_PAGER mechanism to > implement the above pipeline, i.e. > > $ GIT_PAGER="git -p shortlog" git log v1.0.0.. > > Although I never tried it.
It does improve that situation, or at least it stops git from forking frantically.
-- Duy