{"thread":{"id":"13718","subject":"Listing authors of each file in branch HEAD since given revision","startedAt":"2008-05-29T08:43:46Z","lastAt":"2008-05-29T22:57:19Z","messageCount":4,"participants":["Alexander Gladysh","Johannes Schindelin","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"78023","messageId":"c6c947f60805290143r731b4a80v8d8297124899be22@mail.gmail.com","threadId":"13718","inReplyTo":null,"subject":"Listing authors of each file in branch HEAD since given revision","fromName":"Alexander Gladysh","fromEmail":"agladysh@gmail.com","sentAt":"2008-05-29T08:43:46Z","receivedAt":"2008-05-29T08:43:46Z","isPatch":false,"sender":{"key":"agladysh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38239?v=4"},"body":"Hi, list!\n\nFor each file in the head of my current branch I need to get a list of\nall people who altered it since given revision. If file was not\nchanged, it should be not listed.\n\nSomething like:\n\n  my/file1.ext user1 user2 user3\n  my/file2.ext user1\n\nI also need to be able to get closer view with commit names and\nmessages for along with author names:\n\n  my/file1.ext\n    <hash> user1 commit text1\n    <hash> user2 commit text2\n    <hash> user3 commit text2\n\n  my/file2.ext\n    <hash> user1 commit text1\n\nI believe there should be such tool already, or it should be simple\nenough to glue it from existing pieces. Please point me to the right\ndirection.\n\nThanks in advance,\nAlexander.\n"},{"id":"78036","messageId":"alpine.DEB.1.00.0805291344400.13507@racer.site.net","threadId":"13718","inReplyTo":"c6c947f60805290143r731b4a80v8d8297124899be22@mail.gmail.com","subject":"Re: Listing authors of each file in branch HEAD since given revision","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-29T12:47:29Z","receivedAt":"2008-05-29T12:47:29Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 29 May 2008, Alexander Gladysh wrote:\n\n> For each file in the head of my current branch I need to get a list of \n> all people who altered it since given revision. If file was not changed, \n> it should be not listed.\n> \n> Something like:\n> \n>   my/file1.ext user1 user2 user3\n>   my/file2.ext user1\n\nYou will be able to do something like this easily from the output of\n\ngit log --pretty=format:%an --name-only HEAD\n\nProbably just a Perl script which reads the author name, and then attaches \nthat author name to all following file names until an empty lines occurs, \nrecursively.\n\nHth,\nDscho\n"},{"id":"78084","messageId":"20080529195314.GB18781@machine.or.cz","threadId":"13718","inReplyTo":"alpine.DEB.1.00.0805291344400.13507@racer.site.net","subject":"Re: Listing authors of each file in branch HEAD since given revision","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-05-29T19:53:14Z","receivedAt":"2008-05-29T19:53:14Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Hi!\n\nOn Thu, May 29, 2008 at 01:47:29PM +0100, Johannes Schindelin wrote:\n> On Thu, 29 May 2008, Alexander Gladysh wrote:\n> \n> > For each file in the head of my current branch I need to get a list of \n> > all people who altered it since given revision. If file was not changed, \n> > it should be not listed.\n> > \n> > Something like:\n> > \n> >   my/file1.ext user1 user2 user3\n> >   my/file2.ext user1\n> \n> You will be able to do something like this easily from the output of\n> \n> git log --pretty=format:%an --name-only HEAD\n> \n> Probably just a Perl script which reads the author name, and then attaches \n> that author name to all following file names until an empty lines occurs, \n> recursively.\n\nNo rocket science:\n\ngit log --pretty=format:%an --no-merges -r --name-only HEAD~100..HEAD |\nperl -lne 'our %i; $_ or $a = 0 or next; ++$a == 1 and $b = $_ and next;\n$i{$_}{$b}++; END { print \"$_: \" . join(\", \", keys %{$i{$_}}) for (keys\n%i); }'\n\nSorry for the obfuscation. :-)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nWhatever you can do, or dream you can, begin it.\nBoldness has genius, power, and magic in it.\t-- J. W. von Goethe\n"},{"id":"78093","messageId":"alpine.DEB.1.00.0805292356470.13507@racer.site.net","threadId":"13718","inReplyTo":"20080529195314.GB18781@machine.or.cz","subject":"Re: Listing authors of each file in branch HEAD since given revision","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-29T22:57:19Z","receivedAt":"2008-05-29T22:57:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 29 May 2008, Petr Baudis wrote:\n\n> On Thu, May 29, 2008 at 01:47:29PM +0100, Johannes Schindelin wrote:\n> > On Thu, 29 May 2008, Alexander Gladysh wrote:\n> > \n> > > For each file in the head of my current branch I need to get a list of \n> > > all people who altered it since given revision. If file was not changed, \n> > > it should be not listed.\n> > > \n> > > Something like:\n> > > \n> > >   my/file1.ext user1 user2 user3\n> > >   my/file2.ext user1\n> > \n> > You will be able to do something like this easily from the output of\n> > \n> > git log --pretty=format:%an --name-only HEAD\n> > \n> > Probably just a Perl script which reads the author name, and then attaches \n> > that author name to all following file names until an empty lines occurs, \n> > recursively.\n> \n> No rocket science:\n>\n> [snipped]\n\nI know, but I wanted to give Alexander room to grow ;-)\n\nCiao,\nDscho\n"}]}