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

Re: git log -p file.c

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 14, 2007, 23:16 UTC
Message-ID
<alpine.LFD.0.98.0706141611090.14121@woody.linux-foundation.org>
In-Reply-To
<f4shn6$r6q$1@sea.gmane.org>
[ Nit-picking. Not really important. But I reacted to a part of Jakub's 
  explanation ]
On Thu, 14 Jun 2007, Jakub Narebski wrote:
Show 5 quoted lines
> 
> > And is it intended that (clean) merges are shown?
> 
> Path limiting simplifies history, and might linearize it (i.e. merges
> become non-merges).

Actually, path limiting, when it simplifies merges, will *only* simplify a merge when one of the parents was identical to the end result (which implies that the other parents were obviously not interesting as far as the end result is concerned!).

But that has a secondary effect: such a merge will then (by definition) always be simplified away, since the simplified merge no longer makes any changes to the set of files in question!

So "merges become non-merges" is not really true (except in a very internal sense that will be invisible to the outside). They either stay as merges (end result is different from any of the parents on their own), or they go away entirely (end result is identical to one of the parents and the merge ends up not containing any change atr all).

This explanation may, of course, be more nit-picking than anybody really wanted to hear.

			Linus
Previous: Jakub Narebski
Message 4 of 4 in “git log -p file.c”
  1. Uwe Kleine-KoenigJun 14, 2007
  2. sfJun 14, 2007
  3. Jakub NarebskiJun 14, 2007
  4. Linus TorvaldsJun 14, 2007

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.