git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Jun 3, 2009, 23:06 UTC
Message-ID
<20090603230606.GA5462@coredump.intra.peff.net>
In-Reply-To
<alpine.LFD.2.01.0906031547480.4880@localhost.localdomain>
On Wed, Jun 03, 2009 at 03:56:01PM -0700, Linus Torvalds wrote:
Show 7 quoted lines
> > 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
Previous: Linus TorvaldsNext: Linus Torvalds
Message 19 of 26 in “Am able to delete a file with no trace in the log”
  1. Graham PerksJun 2, 2009
  2. Tony FinchJun 2, 2009
  3. Jeff KingJun 2, 2009
  4. Linus TorvaldsJun 2, 2009
  5. Sitaram ChamartyJun 3, 2009
  6. Linus TorvaldsJun 3, 2009
  7. Clean up and simplify rev_compare_tree()Linus Torvalds, Jun 3, 2009
  8. Junio C HamanoJun 3, 2009
  9. Linus TorvaldsJun 3, 2009
  10. Junio C HamanoJun 3, 2009
  11. Linus TorvaldsJun 3, 2009
  12. Linus TorvaldsJun 3, 2009
  13. Avery PennarunJun 3, 2009
  14. Junio C HamanoJun 3, 2009
  15. Linus TorvaldsJun 3, 2009
  16. Junio C HamanoJun 3, 2009
  17. Jeff KingJun 3, 2009
  18. Linus TorvaldsJun 3, 2009
  19. Jeff KingJun 3, 2009
  20. Linus TorvaldsJun 3, 2009
  21. Jeff KingJun 3, 2009
  22. Linus TorvaldsJun 4, 2009
  23. Junio C HamanoJun 4, 2009
  24. Linus TorvaldsJun 3, 2009
  25. Junio C HamanoJun 3, 2009
  26. Junio C HamanoJun 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.