* Listing authors of each file in branch HEAD since given revision
@ 2008-05-29 8:43 Alexander Gladysh
2008-05-29 12:47 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Gladysh @ 2008-05-29 8:43 UTC (permalink / raw)
To: git
Hi, list!
For each file in the head of my current branch I need to get a list of
all people who altered it since given revision. If file was not
changed, it should be not listed.
Something like:
my/file1.ext user1 user2 user3
my/file2.ext user1
I also need to be able to get closer view with commit names and
messages for along with author names:
my/file1.ext
<hash> user1 commit text1
<hash> user2 commit text2
<hash> user3 commit text2
my/file2.ext
<hash> user1 commit text1
I believe there should be such tool already, or it should be simple
enough to glue it from existing pieces. Please point me to the right
direction.
Thanks in advance,
Alexander.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Listing authors of each file in branch HEAD since given revision
2008-05-29 8:43 Listing authors of each file in branch HEAD since given revision Alexander Gladysh
@ 2008-05-29 12:47 ` Johannes Schindelin
2008-05-29 19:53 ` Petr Baudis
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2008-05-29 12:47 UTC (permalink / raw)
To: Alexander Gladysh; +Cc: git
Hi,
On Thu, 29 May 2008, Alexander Gladysh wrote:
> For each file in the head of my current branch I need to get a list of
> all people who altered it since given revision. If file was not changed,
> it should be not listed.
>
> Something like:
>
> my/file1.ext user1 user2 user3
> my/file2.ext user1
You will be able to do something like this easily from the output of
git log --pretty=format:%an --name-only HEAD
Probably just a Perl script which reads the author name, and then attaches
that author name to all following file names until an empty lines occurs,
recursively.
Hth,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Listing authors of each file in branch HEAD since given revision
2008-05-29 12:47 ` Johannes Schindelin
@ 2008-05-29 19:53 ` Petr Baudis
2008-05-29 22:57 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Petr Baudis @ 2008-05-29 19:53 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Alexander Gladysh, git
Hi!
On Thu, May 29, 2008 at 01:47:29PM +0100, Johannes Schindelin wrote:
> On Thu, 29 May 2008, Alexander Gladysh wrote:
>
> > For each file in the head of my current branch I need to get a list of
> > all people who altered it since given revision. If file was not changed,
> > it should be not listed.
> >
> > Something like:
> >
> > my/file1.ext user1 user2 user3
> > my/file2.ext user1
>
> You will be able to do something like this easily from the output of
>
> git log --pretty=format:%an --name-only HEAD
>
> Probably just a Perl script which reads the author name, and then attaches
> that author name to all following file names until an empty lines occurs,
> recursively.
No rocket science:
git log --pretty=format:%an --no-merges -r --name-only HEAD~100..HEAD |
perl -lne 'our %i; $_ or $a = 0 or next; ++$a == 1 and $b = $_ and next;
$i{$_}{$b}++; END { print "$_: " . join(", ", keys %{$i{$_}}) for (keys
%i); }'
Sorry for the obfuscation. :-)
--
Petr "Pasky" Baudis
Whatever you can do, or dream you can, begin it.
Boldness has genius, power, and magic in it. -- J. W. von Goethe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Listing authors of each file in branch HEAD since given revision
2008-05-29 19:53 ` Petr Baudis
@ 2008-05-29 22:57 ` Johannes Schindelin
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2008-05-29 22:57 UTC (permalink / raw)
To: Petr Baudis; +Cc: Alexander Gladysh, git
Hi,
On Thu, 29 May 2008, Petr Baudis wrote:
> On Thu, May 29, 2008 at 01:47:29PM +0100, Johannes Schindelin wrote:
> > On Thu, 29 May 2008, Alexander Gladysh wrote:
> >
> > > For each file in the head of my current branch I need to get a list of
> > > all people who altered it since given revision. If file was not changed,
> > > it should be not listed.
> > >
> > > Something like:
> > >
> > > my/file1.ext user1 user2 user3
> > > my/file2.ext user1
> >
> > You will be able to do something like this easily from the output of
> >
> > git log --pretty=format:%an --name-only HEAD
> >
> > Probably just a Perl script which reads the author name, and then attaches
> > that author name to all following file names until an empty lines occurs,
> > recursively.
>
> No rocket science:
>
> [snipped]
I know, but I wanted to give Alexander room to grow ;-)
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-29 22:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29 8:43 Listing authors of each file in branch HEAD since given revision Alexander Gladysh
2008-05-29 12:47 ` Johannes Schindelin
2008-05-29 19:53 ` Petr Baudis
2008-05-29 22:57 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).