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

Re: git notes: notes

From
Jeff King <peff@peff.net>
Date
Jan 20, 2010, 20:54 UTC
Message-ID
<20100120205452.GA8843@coredump.intra.peff.net>
In-Reply-To
<20100120203636.GA9221@gnu.kitenet.net>
On Wed, Jan 20, 2010 at 03:36:36PM -0500, Joey Hess wrote:
Show 6 quoted lines
> I was asking hypothetically, trying to point out that parts of git log
> seem to make sense to be used as plumbing, with the hope I can continue
> to use it that way.
> 
> (Note that git instaweb parses output of git log --pretty=format:%H --raw
> like it's plumbing.)

I think this is a valid point. Note that "gitk" uses "git log --pretty=raw". However, I believe it splits the entries on "^commit". So I think there is some precedent for scripting "git log"; it has features that are simply not available through other interfaces. And scripting around "--pretty=raw" seems pretty reasonable to me, too. Why else would you want the raw format?

Is splitting on blank lines an error? I don't think so. The original format was never strictly defined, but given the --pretty=raw format, it seems like a fairly obvious thing to do.

I am inclined to cut the notes output from --pretty=raw, and let callers ask for them explicitly with --show-notes or something similar. We can leave them on by default in the "normal" output. This will still break scripts doing "git log | ./script", but I don't think we have ever condoned that practice.

-Peff
Previous: Joey HessNext: Junio C Hamano
Message 10 of 36 in “git notes: notes”
  1. Joey HessJan 20, 2010
  2. Thomas RastJan 20, 2010
  3. Joey HessJan 20, 2010
  4. Johan HerlandJan 20, 2010
  5. Joey HessJan 20, 2010
  6. Junio C HamanoJan 20, 2010
  7. Joey HessJan 20, 2010
  8. Junio C HamanoJan 20, 2010
  9. Joey HessJan 20, 2010
  10. Jeff KingJan 20, 2010
  11. Junio C HamanoJan 20, 2010
  12. Jeff KingJan 20, 2010
  13. Jeff KingJan 20, 2010
  14. Junio C HamanoJan 20, 2010
  15. Jeff KingJan 20, 2010
  16. Michael J GruberJan 20, 2010
  17. Junio C HamanoJan 20, 2010
  18. Jeff KingJan 20, 2010
  19. Junio C HamanoJan 20, 2010
  20. Jeff KingJan 20, 2010
  21. Junio C HamanoJan 20, 2010
  22. Johannes SchindelinJan 20, 2010
  23. Jeff KingJan 20, 2010
  24. Junio C HamanoJan 20, 2010
  25. Johan HerlandJan 21, 2010
  26. Junio C HamanoJan 21, 2010
  27. Junio C HamanoJan 21, 2010
  28. Michael J GruberJan 21, 2010
  29. Matthieu MoyJan 24, 2010
  30. Sverre RabbelierJan 24, 2010
  31. Johan HerlandJan 21, 2010
  32. Johannes SchindelinJan 21, 2010
  33. Joey HessJan 21, 2010
  34. Johan HerlandJan 27, 2010
  35. John KoleszarJan 25, 2010
  36. Christian CouderJan 27, 2010

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.