{"thread":{"id":"21415","subject":"Insertions/Deletions summary for a contributor","startedAt":"2009-10-29T06:44:40Z","lastAt":"2009-10-29T16:01:57Z","messageCount":2,"participants":["Laszlo Papp","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"126240","messageId":"a362e8010910282344vad53b7ck1b7ae04ff3c499ed@mail.gmail.com","threadId":"21415","inReplyTo":null,"subject":"Insertions/Deletions summary for a contributor","fromName":"Laszlo Papp","fromEmail":"djszapi@archlinux.us","sentAt":"2009-10-29T06:44:40Z","receivedAt":"2009-10-29T06:44:40Z","isPatch":false,"sender":{"key":"djszapi@archlinux.us","avatar":null},"body":"Hello,\n\nIt would be nice to see summary for a contributor in insertions/deletions\nlines, changed files regard, in the life of the whole project.\n\nSo the output would be the summary of the following output lines:\ngit log --author=\"Laszlo Papp\" --pretty=tformat: --numstat\n\nCan I deal with it, does it make sense, what do you think about it ?\n\nBest Regards,\nLaszlo Papp\n"},{"id":"126285","messageId":"20091029160156.GA7622@sigill.intra.peff.net","threadId":"21415","inReplyTo":"a362e8010910282344vad53b7ck1b7ae04ff3c499ed@mail.gmail.com","subject":"Re: Insertions/Deletions summary for a contributor","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-10-29T16:01:57Z","receivedAt":"2009-10-29T16:01:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Oct 29, 2009 at 07:44:40AM +0100, Laszlo Papp wrote:\n\n> It would be nice to see summary for a contributor in insertions/deletions\n> lines, changed files regard, in the life of the whole project.\n> \n> So the output would be the summary of the following output lines:\n> git log --author=\"Laszlo Papp\" --pretty=tformat: --numstat\n> \n> Can I deal with it, does it make sense, what do you think about it ?\n\nTry piping the output of the command above through:\n\n  perl -ane '\n        $add{$F[2]} += $F[0];\n        $del{$F[2]} += $F[1];\n        END { print \"$add{$_} $del{$_} $_\\n\" foreach sort keys(%add) }\n  '\n\nbut keep in mind that such a summary is not necessarily a useful value.\nModified lines are represented as deletion and add, and you may simply\nbe deleting and adding the same lines over and over again. :)\n\nA more interesting summary is to \"git blame\" files and count\ncontributor lines. This shows content by that contributor which has\nsurvived to the current tree.\n\n-Peff\n"}]}