eclipse-jgit / jgit

JGit, the Java implementation of git

Home Page:https://www.eclipse.org/jgit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merging does not follow renames

xtianus opened this issue · comments

Version

6.9.0

Operating System

Windows

Bug description

If I rename somefile to anotherfile, commit, then merge from a branch where I have a change to somefile still with the old name, what I get is a conflict saying that somefile has been deleted locally.

Actual behavior

How to reproduce:

  • on master create someFile.txt and commit
  • create a new branch myBranch
  • on this branch edit and commit someFile.txt
  • go back to master
  • rename someFile.txt to anotherFile.txt either within Eclipse or from shell with git mv
  • commit
  • merge from myBranch using Eclipse
  • --> a merge conflict is reported
  • --> git status from the shell shows deleted by us: someFile.txt
  • reset hard and merge from shell with git merge myBranch
  • --> all is fine and the changes to someFile.txt have been merged into anotherFile.txt

Expected behavior

I expect Eclipse to behave like the external git command does, i.e. merge the changes to the old-named file into the renamed file.

Relevant log output

No response

Other information

No response