title: How to show number of lines added and deleted for every file in git log and git diff?
body: <p>If I do <code>git log &lt;commit-id&gt; --stat</code> or <code>git diff</code> with <code>--stat</code>, I get something like:</p>
  
  <pre><code>myproj/src/__main__.py                             |   1 +
  myproj/{ =&gt; src}/utils.py                          |   0
  myproj/{ =&gt; src}/web.py                            |  31 ++++-
  3 files changed, 29 insertions(+), 3 deletions(-)
  </code></pre>
  
  <p>The number next to each file is: <code>number_of_inserts + number_of_deletes</code>. This is not what I want. I want to know the number of lines added and deleted for each file (e.g. <code>+28 -3</code> instead of <code>31</code>).</p>
  
  <ul>
  <li>I know I could use <code>--numstat</code> instead of <code>--stat</code>, but <code>--numstat</code> will not produce the histogram. </li>
  <li><p>I also know that I  can use <a href="https://linux.die.net/man/1/diffstat" rel="nofollow noreferrer"><code>diffstat</code></a>. For example, <code>git diff &lt;commit-id&gt; | diffstat -f4 -C</code>:</p>
  
  <pre><code>myproj/src/__main__.py                             |   1    1    0 +
  myproj/src/web.py                                  |  31   28    3 ++++-
  2 files changed, 29 insertions(+), 3 deletions(-)
  </code></pre>
  
  <p>But here I lose information about file moves/renames (e.g. <code>myproj/{ =&gt; src}/web.py</code>).</p></li>
  </ul>
  
  <p>So how can I get output similar to <code>--stat</code>, but with information about the number of lines added and the number of lines deleted for each file?</p>