title: git-log missing merge commit that undid a change
body: <p>Consider this test script.</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/sh -x
  
  #initialize repository
  rm -rf missing-merge-log
  mkdir missing-merge-log
  cd missing-merge-log
  git init
  
  # create files, x, y, and z
  echo x &gt; x
  echo y &gt; y
  echo z &gt; z
  git add -A .
  git commit -m "initial commit"
  
  # create a branch
  git branch branch
  
  # change x and z on master
  echo x2 &gt; x
  echo z2 &gt; z
  git commit -am "changed x to x2, z to z2"
  git log master -- x
  
  # change y and z on the branch
  git checkout branch
  echo y2 &gt; y
  echo z3 &gt; z
  git commit -am "changed y to y2, z to z3"
  
  # merge master into branch
  git merge master
  # resolve z conflict
  echo z23 &gt; z
  git add z
  # undo changes to x during merge conflict resolution
  # (imagine this was developer error)
  git checkout branch -- x
  git commit --no-edit
  
  # merge branch into master
  git checkout master
  git merge branch
  
  # now the x2 commit is entirely missing from the log
  git log master -- x
  </code></pre>
  
  <p>We first create three files, <code>x</code>, <code>y</code>, and <code>z</code>, and create a branch named <code>branch</code>. In <code>master</code>, we commit a change to <code>x</code> and <code>z</code>, and in the branch, we commit a change to <code>y</code> and <code>z</code>.</p>
  
  <p>Then, in the branch, we merge from <code>master</code>, but during merge conflict resolution, we revert the change to <code>x</code>. (For the sake of this example, imagine that this was a developer error; the developer didn't intend to reject the changes to <code>x</code>.)</p>
  
  <p>Finally, back in <code>master</code>, we merge the changes from the branch.</p>
  
  <p>I would expect at this point for <code>git log x</code> to show three changes: the initial commit, the change to <code>x</code> on master, and the branch commit that reverted the changes to <code>x</code>.</p>
  
  <p>But instead, at the end of the script, <code>git log</code> just shows the initial commit to x, giving no indication that <code>x</code> had ever been modified! This using git version 2.22.0.</p>
  
  <p>Why is <code>git log</code> doing this? Are there parameters to <code>git log -- x</code> that would show what happened here? <code>git log --all -- x</code> doesn't help.</p>
  
  <p>(<code>git log --all</code> does show everything, but in real life that would show all changes to all files, including irrelevant changes to <code>y</code> and <code>z</code>, which would be too difficult to wade through.)</p>