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

Re: Summary of core GIT while you are away.

From
Linus Torvalds <torvalds@osdl.org>
Date
May 26, 2005, 01:45 UTC
Message-ID
<Pine.LNX.4.58.0505251826460.2307@ppc970.osdl.org>
In-Reply-To
<20050526004411.GA12360@vrfy.org>
On Thu, 26 May 2005, Kay Sievers wrote:
Show 15 quoted lines
>
> On Mon, May 16, 2005 at 09:10:10AM -0700, Linus Torvalds wrote:
> > 
> > Then you could just do
> > 
> > 	git-rev-list -v --header HEAD | grep -z 'author[^\n]*Linus'
> > 
> > to tell it to do the "verbose" thing (only showing the header of the 
> > commit, not the whole message), and grep for "Linus" in the author line.
> 
> What happened to that idea? That's not already working in some other way I
> missed, right? The pickaxe stuff is nice and was easy to call from the cgi,
> but searching in commit messages would be nice too.
> If it's not going to happen in the git-binaries, I may do it just in the
> cgi itself.
Ok, you twisted my arm. Checked in.
	git-rev-list --header HEAD | grep -z 'author[\n]*Linus'

and you will get output that is a series of commits by me (strictly speaking, that's not true, since the "author" thing might be in the non-header part).

The format is:
	<commit-id> '\n' <commit-msg> '\0'

and if the full commit message is binary and contains NUL bytes in itself (only crazy people do that, but let's keep in mind that crazy people exist), we naturally truncate it at the first NUL. This makes it easy to parse, and is what makes "grep -z" work, for example.

It also has a rudimentary "stop at commit x" function, but I'm not doing any reachability analysis, so it's purely based on the commit date, and is thus _not_ equivalent to "git-rev-tree START ^END". I reserve the right to try to change that behaviour, though, if I decide I (or sombody else ;) can do a nice incremental reacability thing.

So you can do
	git-rev-list --header HEAD v2.6.12-rc5

and it will print out all the commits in date order until it hits v2.6.12-rc5 (which it won't print out).

The output format is really optimized for something like "git log" or "gitweb". I suspect it's pretty much perfect for doing the "last 10" things, without having to do "git-cat-file" for each commit.

Oh, and I considered adding a "--header-lines=c" which limits the header printout to 'c' lines (probably starting at where the free-form thing starts, so that "--header-lines=0" would print out just the fixed-format header of the commit messages.

(This is slightly different from what I initially envisioned, which had "-v" and "--header", and I'm not sure it's better but it ended up being what I did. If you think my first idea was better, send me a (by now trivial) patch).

		Linus
Previous: Linus TorvaldsNext: Kay Sievers
Message 11 of 28 in “Summary of core GIT while you are away.”
  1. Junio C HamanoMay 14, 2005
  2. Linus TorvaldsMay 16, 2005
  3. rev-list/tree committer/author information.Junio C Hamano, May 16, 2005
  4. Petr BaudisMay 16, 2005
  5. Daniel BarkalowMay 16, 2005
  6. Junio C HamanoMay 16, 2005
  7. Petr BaudisMay 16, 2005
  8. Kay SieversMay 26, 2005
  9. Junio C HamanoMay 26, 2005
  10. Linus TorvaldsMay 26, 2005
  11. Linus TorvaldsMay 26, 2005
  12. Kay SieversMay 26, 2005
  13. Junio C HamanoMay 26, 2005
  14. Kay SieversMay 26, 2005
  15. Junio C HamanoMay 26, 2005
  16. H. Peter AnvinMay 27, 2005
  17. Junio C HamanoMay 27, 2005
  18. H. Peter AnvinMay 27, 2005
  19. Junio C HamanoMay 27, 2005
  20. H. Peter AnvinMay 27, 2005
  21. Junio C HamanoMay 27, 2005
  22. Linus TorvaldsMay 27, 2005
  23. H. Peter AnvinMay 26, 2005
  24. Junio C HamanoMay 26, 2005
  25. Kay SieversMay 26, 2005
  26. Junio C HamanoMay 27, 2005
  27. Kay SieversMay 27, 2005
  28. Junio C HamanoMay 27, 2005

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.