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, 18:41 UTC
Message-ID
<BANLkTikMNYyV40XM26rc6Ov6ZYO643mukA@mail.gmail.com>
In-Reply-To
<7vy611hd38.fsf@alter.siamese.dyndns.org>
On 16 June 2011 18:59, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
>   past ---o----o-----o-----o-----o-----o-----o-----o--- now
>            \                          /
>             o----*----o----o----*----o
>                  ^added         ^removed
>
> then the merges are simplified away and you would not see it.
>
> Perhaps simplify-merges option may help.
Magic, that works!

What I don't get is that I believe the file is removed in the 'merge' commit 'X', which is reachable from master, not in the feature branch:

 2002 ---o----o-----o-----o-----X-----o-----o-----o--- 2011         (CDT)
                                    /
 2006 ---o----o-----o-----o--   (2009)                                  (DSF)
> git log --simplify-merges --oneline -- plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBreakpoints.java

2f1c904 [memory] DSDP-DD -> CDT initial commit 5b47187 Migrated DSF and DSF-GDB to the CDT project. 10580b5 Updated copyright statements. ...

So 5b48718 is X, and the file exists in the DSF parent of X: c1e6da2
I think 2f1c904 is entirely wrong too -- it's another graft I've done,
to a different repo, which isn't to do with DSF, and doesn't contain
IBreakpoints.java:
 > git show 2f1c904:plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBreakpoints.java
fatal: Path 'plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBreakpoints.java'
does not exist in '2f1c904'

Given the file was removed during my 'merge' graft in commit X, shouldn't it be visible in log without --simplify-merges?

Cheers, James

Previous: James BlackburnNext: Junio C Hamano
Message 10 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.