Version
7.2.0
Operating System
Windows
Bug description
In a cherry-pick with an auto 3-way merge, org.eclipse.jgit.merge.ResolveMerger.updateIndex wrongly uses rawMerged.length() for TEXT_CRLF steam causes the issue. rawMerged.length() calculate length in LF but the merged file is in CRLF, cause the index length different from workspace file length. After such cherry-pick, git status will always show the file is modified, then checkout/cherry-pick another commit will change the repository into a conflict state.
Actual behavior
After the cherry-pick, git status shows the file has been modified, but git diff shows no difference. Use git ls-files --debug xxx && ls -l xxx can see the index size is different from the actual file size.
It will be aborted as FAILED if this happens within a rebase action.
Expected behavior
The repository should have no unstaged changes after the cherry-pick.
Relevant log output
Other information
No response
Version
7.2.0
Operating System
Windows
Bug description
In a cherry-pick with an auto 3-way merge,
org.eclipse.jgit.merge.ResolveMerger.updateIndexwrongly usesrawMerged.length()for TEXT_CRLF steam causes the issue.rawMerged.length()calculate length in LF but the merged file is in CRLF, cause the index length different from workspace file length. After such cherry-pick,git statuswill always show the file is modified, then checkout/cherry-pick another commit will change the repository into a conflict state.Actual behavior
After the cherry-pick,
git statusshows the file has been modified, butgit diffshows no difference. Usegit ls-files --debug xxx && ls -l xxxcan see the index size is different from the actual file size.It will be aborted as FAILED if this happens within a rebase action.
Expected behavior
The repository should have no unstaged changes after the cherry-pick.
Relevant log output
Other information
No response