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

Re: git log -p file.c

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 14, 2007, 21:55 UTC
Message-ID
<f4shn6$r6q$1@sea.gmane.org>
In-Reply-To
<20070614090217.GA8271@informatik.uni-freiburg.de>
[Cc: git@vger.kernel.org]
Uwe Kleine-Koenig wrote:
Show 7 quoted lines
> when I run
> 
>       git log -p file.c
> 
> I don't get the complete change a commit introduces but only how file.c
> changed.  This is kind of surprising for me, I had expected to get the
> whole diff.
Try unfortunately _undocumented_ --full-diff option to git-log.
        git log -p --full-diff -- file.c

(the --full-diff option was introduced in commit-477f2b41 without adding appropriate info to Documentation/git-log.txt)

> And is it intended that (clean) merges are shown?

Path limiting simplifies history, and might linearize it (i.e. merges become non-merges).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: sfNext: Linus Torvalds
Message 3 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.