]> source.dussan.org Git - jgit.git/commit
Fix index blob for merges with CRLF translations 74/116574/1
authorThomas Wolf <thomas.wolf@paranor.ch>
Fri, 2 Feb 2018 07:16:13 +0000 (08:16 +0100)
committerThomas Wolf <thomas.wolf@paranor.ch>
Fri, 2 Feb 2018 07:16:13 +0000 (08:16 +0100)
commit9ac415aa95bdeab77142879a7f9196deb4ebefbe
treee466d2691370a62fd2b52a62406f447c500b6756
parent0e4b3023e35823e0929e2b76c6a2878264841f8e
Fix index blob for merges with CRLF translations

Commit fc7d407 corrected line endings for working tree files resulting
from merges when CRLF translations are to be done. However, that also
resulted in the file content being put as-is into the index, which is
wrong. The index must contain the file content with reverse CRLF
translations applied.

With core.autocrlf=true, the working tree file should have CR-LF, but
the index blob must still contain only LF.

Fix this oversight and apply the inverse translation when updating the
index, similar to what is done in AddCommand.

Bug: 499615
Change-Id: I3a33931318bdb580b2390f3450f91ea8f258a6a4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/ResolveMergerTest.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java