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

Re: Can git log <file> follow log of its origins?

From
MPMax Pollard <ajaxsupremo@yahoo.com>
Date
Jan 29, 2008, 21:07 UTC
Message-ID
<790332.92389.qm@web45907.mail.sp1.yahoo.com>
In-Reply-To
<7v63xco0w5.fsf@gitster.siamese.dyndns.org>
--- Junio C Hamano wrote:
Show 14 quoted lines
> Max Pollard writes:
> 
> > I only see the log corresponding to the 2nd commit (v1.5.3.5).
> 
> That is what you are asking "git log" to show.  "git log b.txt"
> means "please simplify the history by throwing away commits that
> do not have changes to paths that match b.txt, and then show the
> resulting log with the change pertaining to that path".  The
> first commit does not change a path called b.txt (in other
> words, "git show --stat HEAD^" will not give diffstat for "b.txt"),
> so that commit is not shown.
> 
> $ git log --pretty=oneline --name-status -C -C
> 

Got it - many thanks. So -C -C is the answer, with --name-status or --stat to actually show the result. From the code, a status like Cxxx appears to contain the "similarity percentage" in xxx; so that C100 would mean an exact copy...

MP
      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “Can git log <file> follow log of its origins?”
  1. Max PollardJan 29, 2008
  2. SeanJan 29, 2008
  3. Max PollardJan 29, 2008
  4. Junio C HamanoJan 29, 2008
  5. Max PollardJan 29, 2008
  6. Junio C HamanoJan 29, 2008
  7. Max PollardJan 29, 2008

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.