How to git blame to see what code from a single committer before X date has survived?

324 views Asked by At

I joined a very experienced developer team as a complete RoR newb a year ago and now we're trying to guess how much of the code I wrote in the first six months has survived.

I think I can use git blame on the entire repo and then grep for my username but I'm hitting a wall.

1

There are 1 answers

1
shengy On

There are many git statistics tools, maybe see if they do the job you need? click here and here.

EDIT:

I went to discover one of these tools and found that it perfectly suits you. gitinspector, following is it's text output format:

$ ./gitinspector.py -wTHl /path/to/some/git/repository
The following historical commit information, by author, was found in the repository:

Author               Commits   Insertions   Deletions   % of changes
John Smith               288         7721        4617          39.19
James Johnson            135         8910        2422          35.99
Robert Brown              71         2564        1352          12.44
Michael Davids           134         2943         954          12.38

Below are the number of rows from each author that have survived and are still intact in the current revision:

Author                     Rows   % in comments
John Smith                 3533           22.02
James Johnson              6113           52.15
Robert Brown               1123           21.19
Michael Davids             1464           20.15

The following history timeline has been gathered from the repository:

Author                  2012W37    2012W38    2012W39    2012W40    2012W41    2012W42    2012W43
John Smith             --++++++      --+++   --++++++       -+++   ---+++++  ----+++++          .
James Johnson                 +   -+++++++       ++++  -++++++++       --++     --++++   -+++++++
Robert Brown                         --+++          +          .       -+++          +          .
Michael Davids                         +++         ++          +          +          +          .
Modified Rows:             1522       3832       7553       6143       5833       5123       1477            

The extensions below were found in the repository history (extensions used during statistical analysis are marked):
xml [java] pdf txt css