jgit/org.eclipse.jgit.test/tst-rsrc/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
..
attributes Attributes: fix handling of text=auto in combination with eol 2020-05-22 17:08:52 -04:00
diff PatchApplier: fix handling of last newline in text patch 2022-12-26 11:51:25 +01:00
indexdiff Fix symlink content comparison on MacOS in tree walk 2016-10-11 00:20:23 +02:00
internal/transport/http HTTP: cookie file stores expiration in seconds 2021-03-03 00:26:51 +01:00
nls Fix TestTranslationBundle 2010-12-31 14:01:34 -08:00
patch Initial JGit contribution to eclipse.org 2009-09-29 16:47:03 -07:00
test/resources CommitGraph: implement commit-graph read 2022-12-16 06:57:06 -05:00
util ApplyCommand: add a stream to apply a delta patch 2021-05-26 00:37:59 +02:00