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

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
Previous: Zack BrownNext: Zack Brown
Message 13 of 14 in “speeding up cg-log -u”
  1. Zack BrownMay 14, 2005
  2. Junio C HamanoMay 14, 2005
  3. Add --author match to git-rev-list and git-rev-tree.Junio C Hamano, May 14, 2005
  4. Petr BaudisMay 14, 2005
  5. Petr BaudisMay 14, 2005
  6. Junio C HamanoMay 14, 2005
  7. Zack BrownMay 14, 2005
  8. Petr BaudisMay 14, 2005
  9. Daniel BarkalowMay 15, 2005
  10. Junio C HamanoMay 16, 2005
  11. Daniel BarkalowMay 16, 2005
  12. Zack BrownMay 14, 2005
  13. Petr BaudisMay 14, 2005
  14. Zack BrownMay 14, 2005

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.