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

Re: Git notes list/show <revision-range>

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 19, 2011, 07:17 UTC
Message-ID
<4DAD371F.9040003@drmicha.warpmail.net>
In-Reply-To
<20110418182724.GB11250@sigill.intra.peff.net>
Jeff King venit, vidit, dixit 18.04.2011 20:27:
Show 21 quoted lines
> On Mon, Apr 18, 2011 at 08:19:59PM +0200, Vincent van Ravesteijn wrote:
> 
>> When a feature/patch is proposed, it will "cook" for a while in "pu"
>> and "next". During this period people can comment on the patch. These
>> comments can be stored in git notes added to the commits on which is
>> commented.
> 
> If you haven't already seen it, you might find the "notes/*" refs here:
> 
>   git://repo.or.cz/git/trast.git
> 
> They reference the messages discussing the patch on the mailing list by
> message-id and gmane link.
> 
>> That's why I want to (try to) implement the feature that 'git notes
>> list' and 'git notes show' accept a revision range and collect all
>> notes for the commits in this range.
> 
> You can do more-or-less what you want with something like:
> 
>   git log --format="%h %s%n%N"

Exactly, the log family does that and more, since it makes the whole revision walk machinery available.

But since the OP is volunteering to code for notes :-) We could need a feature which allows to log the history of a note. The alias

`git noteslog' is aliased to `!sh -c 'git log $(git notes get-ref) "$@"' -'

gives you the history of the notes tree (try it with "-p"), but sometimes I would like the history of the notes to a specific commit, and in

git noteslog -p -- $(commit)

I would have to use for $(commit) all possible breakdowns of the sha1 of the commit for all possible notes tree structures. It feels as of the revision walker needs to learn another pathspec, say

":(note):<sha1>"
in line with our magic pathspec discussion.
Michael
Previous: Jeff KingNext: Jeff King
Message 3 of 6 in “Git notes list/show <revision-range>”
  1. Vincent van RavesteijnApr 18, 2011
  2. Jeff KingApr 18, 2011
  3. Michael J GruberApr 19, 2011
  4. Jeff KingApr 19, 2011
  5. Michael J GruberApr 20, 2011
  6. Jeff KingApr 20, 2011

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.