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, 22:25 UTC
Message-ID
<20100120222548.GD15936@coredump.intra.peff.net>
In-Reply-To
<7v3a201lpz.fsf@alter.siamese.dyndns.org>
On Wed, Jan 20, 2010 at 01:59:36PM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> Subject: Fix "log" family not to be too agressive about showing notes
> 
> Giving "Notes" information in the default output format of "log" and
> "show" is a sensible progress (the user has asked for it by having the
> notes), but for some commands (e.g. "format-patch") spewing notes into the
> formatted commit log message without being asked is too aggressive.
> 
> Enable notes output only for "log", "show", "whatchanged" by default;
> other users can ask for it by setting show_notes field to true.

What I didn't get out of reading this but did from reading the code (I think) is what you meant by "by default" here. That is, doing:

  git log
will show notes, but neither
  git log --pretty=raw
nor even
  git log --pretty=medium

will do so, even though the latter otherwise produces identical output to the default.

That seems like a reasonable rule to me, but I just wanted to make sure that was both what was happening and what was intended.

Show 9 quoted lines
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  builtin-log.c |    2 ++
>  commit.h      |    1 +
>  log-tree.c    |    1 +
>  pretty.c      |    2 +-
>  revision.c    |    4 ++++
>  revision.h    |    1 +
>  6 files changed, 10 insertions(+), 1 deletions(-)

No tests or docs, of course. :) You can squash the --pretty=raw test from my patch, but you will need to exercise --show-notes and --no-show-notes, too, as well as checking other formats and things like format-patch. So probably writing your own tests will make it easier to more thoroughly check each case.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 20 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.