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