Re: [PATCH] Add --author match to git-rev-list and git-rev-tree.
- From
Petr Baudis <pasky@ucw.cz>
- Date
- May 14, 2005, 15:52 UTC
- Message-ID
- <20050514155257.GR3905@pasky.ji.cz>
- In-Reply-To
- <20050514150607.GA14184@tumblerings.org>
Dear diary, on Sat, May 14, 2005 at 05:06:07PM CEST, I got a letter where Zack Brown <zbrown@tumblerings.org> told me that...
Show 19 quoted lines
> On Sat, May 14, 2005 at 02:50:24AM -0700, Junio C Hamano wrote: > > Zack Brown wondered if handling author match at core GIT level > > would make cg-log -u go faster (JIT also can use this in jit-log > > --author). Here is a patch to implement it. > > > > I considered adding author and committer strings to commit > > objects for general use as commit objects are parsed, but I was > > unsure about the lifetime rules of the commit objects (nobody > > seems to free them in the current code), so refrained from doing > > so for the time being. The code instead re-reads the commit > > object when it needs to filter them by the author. > > I applied this, but can't figure out the change to make to cg-log in order to > actually test it. > > - git-cat-file commit $commit | grep -e '^author ' -e '^committer ' | grep -qi "$user" || continue > + git-cat-file --author $user commit $commit || continue > > sure didn't work.
You throw that whole thing away and pass the --author parameter directly to git-rev-(list|tree).
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor