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
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 3, 2009, 22:56 UTC
Message-ID
<alpine.LFD.2.01.0906031547480.4880@localhost.localdomain>
In-Reply-To
<20090603224413.GA2902@coredump.intra.peff.net>
On Wed, 3 Jun 2009, Jeff King wrote:
> 
> 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.

And doing good diffs for a merge is _hard_. The "--cc" thing is supremely useful - it's just that it's useful for data conflicts, not for metadata issues.

It's in fact somewhat dubious if you actually want to see the file removal as a _diff_ in a merge, exactly because it's so verbose and yet often so uninteresting (ie the removal may well be intentional).

It might be that the right thing to do is to expand on "-c" and '--cc" to just give a summary of metadata changes.

Right now, "-c" and "--cc" ignore files that didn't change from one of the parents.

But maybe the right thing to do is to entirely ignore files only if they exist in all parents, but didn't change in one - and for things that have actual metadata changes, just say

 - exists in merge result, but not in parent 2:
   File 'x' was created in parent 1
 - does not exist in merge result, but exists in parent 1:
   File 'y' was deleted by parent 2

or similar (with perhaps even rename detection some day if -M is specified, although n-way rename detection is likely pretty painful).

IOW, do the whole "extended diff", but not actually show any diffs, just summary information, for new/deleted files in merges.

That would be enough of a hint to then use other tools to see the exact details of what happened..

			Linus
Previous: Jeff KingNext: Jeff King
Message 18 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.