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

Re: git log --follow doesn't follow a rename over a merge

From
James Blackburn <jamesblackburn@gmail.com>
Date
Jun 16, 2011, 13:31 UTC
Message-ID
<BANLkTik1-UvEXqzgdXwcK3x6_o8fDiwB7g@mail.gmail.com>
In-Reply-To
<m362o5vrhd.fsf@localhost.localdomain>
On 16 June 2011 14:25, Jakub Narebski <jnareb@gmail.com> wrote:
Show 14 quoted lines
> James Blackburn <jamesblackburn@gmail.com> writes:
>
>> I'm trying, without success, to get git log to show the history of a
>> file across a rename.  I'm using git version 1.7.5.4, and git blame
>> has no such issues tracking the source of the lines.
>
> [...]
>
>> Have I done something wrong in grafting history like this, or is this
>> just a problem with the way git log --follow tracks renames?
>
> The `--follow` option to git-log is more of a bolted-on hack rather
> than proper solution, see 750f7b6 (Finally implement "git log
> --follow", 2007-06-19), and it might not work in all cases.
Thanks for the reply Jakub.
I'm also interested in knowing what incantation I need to give to
actually get history of the file which was previously removed.  e.g. I
know the full path:
   plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBreakpoints.java
used to exist, but without --follow, git log returns nothing.

Similarly I can't figure out how to find (without knowing in advance) which was the last commit which contained this version of IBreakpoints.java. i.e. which commit removed / renamed it?

Cheers, James

Previous: Jakub NarebskiNext: James Blackburn
Message 3 of 14 in “git log --follow doesn't follow a rename over a merge”
  1. James BlackburnJun 15, 2011
  2. Jakub NarebskiJun 16, 2011
  3. James BlackburnJun 16, 2011
  4. James BlackburnJun 16, 2011
  5. Jeff KingJun 16, 2011
  6. Jeff KingJun 16, 2011
  7. Junio C HamanoJun 16, 2011
  8. Jeff KingJun 16, 2011
  9. James BlackburnJun 16, 2011
  10. James BlackburnJun 16, 2011
  11. Junio C HamanoJun 16, 2011
  12. James BlackburnJun 16, 2011
  13. James BlackburnJun 16, 2011
  14. James BlackburnJun 16, 2011

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.