git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [git pull] core/softirq for v2.6.27

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jul 14, 2008, 17:46 UTC
Message-ID
<alpine.LFD.1.10.0807141026200.3305@woody.linux-foundation.org>
In-Reply-To
<alpine.LFD.1.10.0807141019010.3305@woody.linux-foundation.org>
On Mon, 14 Jul 2008, Linus Torvalds wrote:
Show 6 quoted lines
> 
> Some really ugly scripting like this will do it:
> 
> 	#!/bin/sh
> 	git log --pretty='format:commit %H
> 	Author: %an <%ae>
Side note: you can make it a one-liner with '%n' (not \n') if you want, ie
	#!/bin/sh
	git log --pretty='format:commit %H%nAuthor: %an <%ae>%n%n %s (%h)%n' $@ | git shortlog
if you want to make it look even more like line noise.

And if you want to be _really_ fancy, you can even make it a git alias. Just add somethign like this to your ~/.gitconfig file:

	[alias]
		mylog=!GIT_PAGER='git --no-pager shortlog' git log --pretty='format:commit %H%nAuthor: %an <%ae>%n%n %s (%h)%n'
which is the _real_ git-mans way to do it.

It does the "shortlog" output by using "git shortlog" as a pager, but then to avoid recursion, we have to turn off paging of shortlog output itself. Heh. And the reason to do that is that the arguments always go to the end, so since we want to give the args to "git log", we can't put the pipe at the end.

I will have to go wash up after writing the above.
		Linus
Previous: Johannes Schindelin
Message 5 of 5 in “Re: [git pull] core/softirq for v2.6.27”
  1. Linus TorvaldsJul 14, 2008
  2. Linus TorvaldsJul 14, 2008
  3. Johannes SchindelinJul 14, 2008
  4. shortlog: support --pretty=format: optionJohannes Schindelin, Jul 14, 2008
  5. Linus TorvaldsJul 14, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.