diff options
author | Jack Wickham <jwickham@palantir.com> | 2020-03-25 17:58:54 +0000 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2020-05-06 08:50:08 +0200 |
commit | b6d70a66ae6382e40290a78b2946b9ffa8c6d98f (patch) | |
tree | 43f04bc06a189d3101520fd05df0c4183db5c1da /org.eclipse.jgit.test/tst-rsrc | |
parent | d69c0ef5bdadda57ac457e56f6ca0291131d8d9b (diff) | |
download | jgit-b6d70a66ae6382e40290a78b2946b9ffa8c6d98f.tar.gz jgit-b6d70a66ae6382e40290a78b2946b9ffa8c6d98f.zip |
Apply hunks when renaming or copying from patch files
When applying a patch that contains renames or copies using ApplyCommand,
also apply all hunks that apply to the renamed or copied file.
Change-Id: I9f3fa4370458bd7c14beeb2e2b49e846d70203cb
Signed-off-by: Jack Wickham <jwickham@palantir.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst-rsrc')
6 files changed, 42 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks.patch new file mode 100644 index 0000000000..44cb309e73 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks.patch @@ -0,0 +1,13 @@ +diff --git a/CopyWithHunks b/CopyResult +similarity index 75% +copy from CopyWithHunks +copy to CopyResult +index 0000000..de98044 +--- a/CopyWithHunks ++++ b/CopyResult +@@ -1,4 +1,4 @@ + line1 +-line2 ++lineB + line3 + line4 diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks_PostImage new file mode 100644 index 0000000000..58d80465cc --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks_PostImage @@ -0,0 +1,4 @@ +line1 +lineB +line3 +line4 diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks_PreImage new file mode 100644 index 0000000000..84275f9939 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/CopyWithHunks_PreImage @@ -0,0 +1,4 @@ +line1 +line2 +line3 +line4 diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks.patch new file mode 100644 index 0000000000..06b166f0b9 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks.patch @@ -0,0 +1,13 @@ +diff --git a/RenameWithHunks b/nested/subdir/Renamed +similarity index 75% +rename from RenameWithHunks +rename to nested/subdir/Renamed +index 0000000..de98044 +--- a/RenameWithHunks ++++ b/nested/subdir/Renamed +@@ -1,4 +1,4 @@ + line1 +-line2 ++lineB + line3 + line4 diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks_PostImage new file mode 100644 index 0000000000..58d80465cc --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks_PostImage @@ -0,0 +1,4 @@ +line1 +lineB +line3 +line4 diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks_PreImage new file mode 100644 index 0000000000..84275f9939 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/RenameWithHunks_PreImage @@ -0,0 +1,4 @@ +line1 +line2 +line3 +line4 |