jgit/org.eclipse.jgit
Thomas Wolf 9a6d602488 PatchApplier: fix handling of last newline in text patch
If the last line came from the patch, use the patch to determine whether
or not there should be a trailing newline. Otherwise use the old text.

Add test cases for
- no newline at end, last line not in patch hunk
- no newline at end, last line in patch hunk
- patch removing the last newline
- patch adding a newline at the end of file not having one

all for core.autocrlf false, true, and input.

Add a test case where the "no newline" indicator line is not the last
line of the last hunk. This can happen if the patch ends with removals
at the file end.

Bug: 581234
Change-Id: I09d079b51479b89400ad300d0662c1dcb50deab6
Also-by: Yuriy Mitrofanov <a2terminator@mail.ru>
Signed-off-by: Thomas Wolf <twolf@apache.org>
2022-12-26 11:51:25 +01:00
..
.settings Fix API warnings for the new CommitGraph 2022-12-17 10:36:50 +01:00
META-INF Fix API warnings for the new CommitGraph 2022-12-17 10:36:50 +01:00
findBugs [spotbugs] Silence NP_BOOLEAN_RETURN_NULL in IgnoreNode#checkIgnored 2020-12-22 10:52:59 +01:00
resources/org/eclipse/jgit CommitGraph: implement commit-graph read 2022-12-16 06:57:06 -05:00
src/org/eclipse/jgit PatchApplier: fix handling of last newline in text patch 2022-12-26 11:51:25 +01:00
.classpath Bump minimum required Java version to 11 2021-09-29 17:12:12 +02:00
.fbprefs
.gitignore Finish removing Apache Felix maven-bundle-plugin 2010-01-12 11:46:55 -08:00
.project
BUILD Squash error-prone messages 2022-08-01 15:47:20 +02:00
about.html
build.properties Add "resources/" as a source folder 2010-06-05 14:39:27 +02:00
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 6.5.0-SNAPSHOT builds 2022-11-23 19:09:33 +01:00