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

Re: gitweb filter for patches by a specific person in a specific timeframe

From
Jeff King <peff@peff.net>
Date
Aug 28, 2006, 18:16 UTC
Message-ID
<20060828181626.GB2950@coredump.intra.peff.net>
In-Reply-To
<200608281459.26643.kai.blin@gmail.com>
On Mon, Aug 28, 2006 at 02:59:21PM +0200, Kai Blin wrote:
Show 6 quoted lines
> I have just completed my Google Summer of Code[1] project[2] working for the 
> Wine project. Now, as I was submitting patches to a git repository, I don't 
> have a branch solely containing my patches or something like that. Google 
> seems to want something like this, so I figured maybe I could get gitweb to 
> filter for my patches during the SoC period. Is that possible?
> If not, does it sound like something feasible to add?

You can create an mbox of all of the changes you made. Unfortunately git-rev-list doesn't do author/committer matching, so you'll need a short perl script:

-- >8 -- $ cat >match-who.pl <<'EOF' #!/usr/bin/perl

my $name = shift; my $match = qr/$name/i;

my $commit;
while(<>) {
  chomp;
  next unless $_;
  next if /^\s/;
  my ($k, $v) = split / /, $_, 2;
  if($k eq 'commit') {
    $commit = $v;
  }
  if($commit && ($k eq 'author' || $k eq 'committer') && $v =~ $match) {
    print "$commit\n";
    $commit = undef;
  }
}
-- >8 --
Then you should be able to do:
$ git-rev-list --pretty=raw master |
  perl match-who.pl kai.blin@gmail.com |
  git-diff-tree -p --stdin --pretty=email \
  > my-patches

You can either look through that, or you can try applying the patches with git-am (though if your patches depend on changes not by you that happened in the intervening time, you'll probably have some rejects).

-Peff
Previous: Jakub NarebskiNext: Linus Torvalds
Message 3 of 7 in “gitweb filter for patches by a specific person in a specific timeframe”
  1. Kai BlinAug 28, 2006
  2. Jakub NarebskiAug 28, 2006
  3. Jeff KingAug 28, 2006
  4. Linus TorvaldsAug 28, 2006
  5. Support author and commiter based revision list limitingJonas Fonseca, Aug 31, 2006
  6. Junio C HamanoSep 1, 2006
  7. git log --author='Jeff King'Junio C Hamano, Sep 18, 2006

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.