title: Generate git diff from a list of commits
body: <p>Given a range of commits such as</p>
  
  <pre><code>b9dc80c commit msg 1 #530
  88a4d3c another commit
  1010bce commit msg 2 #530
  040ac6d commit msg 3 #530
  6b72683 another commit
  ed17416 another commit
  f49bbbd commit msg 4 #530
  </code></pre>
  
  <p>I would like to see diff of all changes in commits with <code>#530</code>.
  So far, I have all the appropriate hashes in a convinient format.</p>
  
  <pre><code>git log --oneline | grep #530 | awk -F" " '{print $1}' | xargs echo
  # b9dc80c 1010bce 040ac6d f49bbbd
  </code></pre>
  
  <p>Can I somehow "merge" these commits into a one diff? That is, merge in memory, without actually affecting the original repository. I know I can cherry pick those commits in a separate branch and diff that, but that is too complicated.</p>
  
  <p>The use case is that I want to see all changes with the ticket id specified.</p>
  
  <p>example:</p>
  
  <pre><code>echo a &gt; file
  git add file &amp;&amp; git commit "first"
  echo b &gt; file
  git add file &amp;&amp; git commit "second #XX"
  echo a &gt; file
  git add file &amp;&amp; git commit "third #XX"
  the-special-command
  </code></pre>
  
  <p>with the "diff" I had in mind, "comparing" <code>#XX</code> commits should give empty output rather than two separate changes to <code>file</code>.</p>