Thread (9 messages) flat view 9 messages, 3 authors, 2016-06-15

Re: Am able to delete a file with no trace in the log

From: Jeff King <hidden>
Date: 2016-06-15 22:46:54

On Wed, Jun 03, 2009 at 03:56:01PM -0700, Linus Torvalds wrote:
quoted
Is there a way to say "show me everything that touched x, _including_
merges"?
Well, that's the "--simplify-merges" part. 

It's just that our diff generation isn't very smart. We do show the 
commit, we just don't show a meaningful diff in that case.
No, --simplify-merges doesn't show the merge, unless I am doing
something very wrong. Try (and this is a simplified version of the
original example):

  mkdir repo && cd repo && git init &&
  echo content >base && git add base && git commit -m base &&
  echo context >a.txt && git add a.txt && git commit -m 'master 1' &&
  git checkout -b other HEAD^ &&
  echo content >b.txt && git add b.txt && git commit -m 'other 1' &&
  echo conflict >a.txt && git add a.txt && git commit -m 'other 2' &&
  git checkout master &&
  git merge other ;# conflicts

  rm b.txt && git add b.txt &&
  echo resolve >a.txt && git add a.txt &&
  git commit -m merged

Now try running git log on that. I can see the merge diff if I use "-m",
which is obviously too verbose, but at least works. But if I give
"b.txt" as a path limiter, I can't get the merge commit to display at
all. Doing "git log -m --simplify-merges --stat -- b.txt" yields only
the commit "other 1" in which b.txt was added.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help