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:40 UTC
Message-ID
<743519.95328.qm@web45916.mail.sp1.yahoo.com>
In-Reply-To
<7vr6g0mip2.fsf@gitster.siamese.dyndns.org>
--- Junio C Hamano wrote:
Show 15 quoted lines
> Max Pollard writes:
> 
> > ...  So -C -C is the answer, with --name-status or --stat to
> > actually show the result.
> 
> The real "answer" part in that example is not -C -C.  Obviously,
> you would need double-C aka --find-copies-harder, because you
> did not change a.txt when creating b.txt, so it is still needed.
> 
> But the essential part of the answer is "not giving b.txt as the
> pathspec, so that whatever _other_ file that could have been
> copied into it is still visible when the command works".
> 
> If you say "git log --name-status -C -C -- b.txt", you would be
> back to square one.
Aha, point taken.  In this case, looks like I can do:
    $ git log -C -C --full-diff --name-status/--stat/--summary -- b.txt

as Sean has suggested to get the copy information back. Or are you saying that even with "--full-diff" I can lose copy information in some cases?

MP
      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Previous: Junio C Hamano
Message 7 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.