Re: getting a list of changes I commited
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Sep 15, 2005, 18:38 UTC
- Message-ID
- <Pine.LNX.4.58.0509151128170.26803@g5.osdl.org>
- In-Reply-To
- <B8E391BBE9FE384DAA4C5C003888BE6F046625FC@scsmsx401.amr.corp.intel.com>
On Thu, 15 Sep 2005, Luck, Tony wrote:
Show 9 quoted lines
> > So I think that what I want is to produce a list of changes > that I commited when I push a new tree out to kernel.org. > But ... such a push usually contains lots of flow-through > changes that I pulled from Linus ... so a simple: > > $ git-rev-list --no-merges newhead ^oldhead > > gives a long list of changes.
Why not just _also_ limit it by what is already merged in my tree?
Ie just do
git fetch linus git-rev-list --no-merges newhead ^oldhead ^linus
The problem with your approach:
Show 5 quoted lines
> I'd like to filter out > all the ones that weren't commited by me. Is there an > argument to git-rev-list that will just print the entries > where I'm listed as the commiter, or do I have to use > "--pretty-full" and write a little script to do the trim?
This is what "--header" (and it's zero termination) is designed for: you can do
git-rev-list --header --no-merges newhead ^oldhead | grep -z "committer .*tony\.luck"
and it will give a nice NUL-terminated output list of just your commits. No complex script necessary.
HOWEVER. The reason I suggest adding the ^linus instead is that I suspect people really wants to see the development stuff, and that's what they'd get if you just run the script often enough (and daily is certainly often enough). Also, the "grep the committer" approach fundamentally doesn't work if you ever plan on having sub-lieutenants that work with you and that you use git to merge with.
But hey, that grep thing certainly works too. The output is trivial to parse.
(Oh, and I think "-z" is a GNU grep extension.)
Linus