Re: git log: Add a switch to limit the number of displayed lines from the commit messages
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 17, 2013, 06:18 UTC
- Message-ID
- <20130617061852.GA6942@elie.Belkin>
- In-Reply-To
- <7vd2rlic2q.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 5 quoted lines
> Or inside "less" that is spawned by "git log -p", I often say this: > > /^commit .*|^diff --git .*<ENTER> > > and navigate with 'n' and 'p'.
Hm, that implies an interesting trick. If I run
LESS='FRSX +/^commit |^diff --git ' git log -p
then 'n' and shift+'n' can be used for navigating without having to spell out the /pattern to start by hand.