git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git log: Add a switch to limit the number of displayed lines from the commit messages
@ 2013-06-15 18:07 Paul Menzel
  2013-06-15 19:19 ` Jonathan Nieder
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2013-06-15 18:07 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

Dear git folks,


there are people out there disliking elaborate commit messages, as going
over `git log` is tedious as you have to scroll a lot. As I do not like
the suggestion to make commit messages shorter by omitting certain
details, a way to limit the number displayed lines of the commit
messages would be nice to have.

The switch `--format=oneline` exists already. Unfortunately a lot of
commits do not have a informative enough summary, so the first lines of
the commit message are still needed/desired to understand the commit
more.

Could a switch be added, like `--commit-message-lines` (sorry for not
coming up with something better) to limit the number of displayed lines?
That would be great!

For older git versions, do you know of editor/pager options to achieve
this?


Thanks,

Paul

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git log: Add a switch to limit the number of displayed lines from the commit messages
  2013-06-15 18:07 git log: Add a switch to limit the number of displayed lines from the commit messages Paul Menzel
@ 2013-06-15 19:19 ` Jonathan Nieder
  2013-06-17  4:41   ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Nieder @ 2013-06-15 19:19 UTC (permalink / raw)
  To: Paul Menzel; +Cc: git

Hi Paul,

Paul Menzel wrote:

> there are people out there disliking elaborate commit messages, as going
> over `git log` is tedious as you have to scroll a lot. As I do not like
> the suggestion to make commit messages shorter by omitting certain
> details, a way to limit the number displayed lines of the commit
> messages would be nice to have.

Have you tried gitk or tig?  They split the screen so you can browse
through commits, one per line, in one half and read the corresponding
commit messages and patches in the other.

Hope that helps,
Jonathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git log: Add a switch to limit the number of displayed lines from the commit messages
  2013-06-15 19:19 ` Jonathan Nieder
@ 2013-06-17  4:41   ` Junio C Hamano
  2013-06-17  6:18     ` Jonathan Nieder
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-06-17  4:41 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Paul Menzel, git

Jonathan Nieder <jrnieder@gmail.com> writes:

>> there are people out there disliking elaborate commit messages, as going
>> over `git log` is tedious as you have to scroll a lot. As I do not like
>> the suggestion to make commit messages shorter by omitting certain
>> details, a way to limit the number displayed lines of the commit
>> messages would be nice to have.
>
> Have you tried gitk or tig?  They split the screen so you can browse
> through commits, one per line, in one half and read the corresponding
> commit messages and patches in the other.

Or inside "less" that is spawned by "git log -p", I often say this:

    /^commit .*|^diff --git .*<ENTER>

and navigate with 'n' and 'p'.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git log: Add a switch to limit the number of displayed lines from the commit messages
  2013-06-17  4:41   ` Junio C Hamano
@ 2013-06-17  6:18     ` Jonathan Nieder
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Nieder @ 2013-06-17  6:18 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Paul Menzel, git

Junio C Hamano wrote:

> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-17  6:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-15 18:07 git log: Add a switch to limit the number of displayed lines from the commit messages Paul Menzel
2013-06-15 19:19 ` Jonathan Nieder
2013-06-17  4:41   ` Junio C Hamano
2013-06-17  6:18     ` Jonathan Nieder

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).