Re: [PATCH RFC] show-branch: use pager
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 13, 2013, 17:33 UTC
- Message-ID
- <7vobb9vrt7.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1371105811-3112-1-git-send-email-oystwa@gmail.com>
Øystein Walle <oystwa@gmail.com> writes:
Show 11 quoted lines
> This is for consistency with other porcelain commands such as 'log'. > > Signed-off-by: Øystein Walle <oystwa@gmail.com> > --- > The rationale for this patch I hope is consicely explained in the commit > message. I was rather surprised it didn't use a pager as I've gotten used to it > for most commands. > > I marked this as an RFC because of Jeff King's comments in > daa0c3d97 where I got the impression this this might not be a good idea. > However I haven't found any bugs and all the tests pass.
The tests are run largely without tty to allow them to run unattended, aren't they?
I think it makes a lot of sense to use pager by default for the normal show-branch output. I however do not think pager should apply to other modes (e.g. --independent, --merge-base).
But the use of these other modes are meant to be on the upstream side of a pipe or to be written out to a file, so a blanket call to setup_pager() before you even discover what mode we are in would not hurt in practice.