title: How to calculate the changed line by git?
body: <p>When I use <code>git log - -stat</code>, I can get the “file changed, addition and deletion”. However, I want to calculate how many line changed. For example:</p>
  
  <pre><code>git log --stat
  -  Print “hello world”;
  -  int a;
  -  int b;
  -  String name;
  -  print "a"
  +  Print “Hello, World!”
  1 file changed, 1 addition, 5 deletions.
  </code></pre>
  
  <p>It’s 1 modified place, but Git just tells me there is 1 addition and 5 deletions. I want to get:</p>
  
  <pre><code>git log --stat
  -  Print “hello world”;
  -  int a;
  -  int b;
  -  String name;
  -  print "a"
  +  Print “Hello, World!”
  1 file changed, 0 addition, 4 deletions, 1 modify
  </code></pre>
  
  <p>How could I calculate the number of modified lines with Git automatically?</p>
  
  <p>I have try <code>git log -p</code> , it shows like:</p>
  
  <pre><code>git log -p
  -  Print “hello world”;
  -  int a;
  -  int b;
  -  String name;
  -  print "a"
  +  Print “Hello, World!”
  </code></pre>
  
  <p>So, I need to check it one by one. Does git have the method to calculate the changed lines?</p>