Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2014-06-29 21:24:07 +0000
committerRobin Rosenberg2014-08-02 23:16:23 +0000
commit1cc69e2673ee4c78382eac1bc2d6e13372ea72cb (patch)
treed2631b60800efb1f607f3e2a4fcf7eab93e0af0d /org.eclipse.egit.core.test
parent7183e9296f19e8d9416ed60e80cce312895a66e9 (diff)
downloadegit-1cc69e2673ee4c78382eac1bc2d6e13372ea72cb.tar.gz
egit-1cc69e2673ee4c78382eac1bc2d6e13372ea72cb.tar.xz
egit-1cc69e2673ee4c78382eac1bc2d6e13372ea72cb.zip
Enable Create Patch for first commit in the history view
Diffstat (limited to 'org.eclipse.egit.core.test')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CreatePatchOperationTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CreatePatchOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CreatePatchOperationTest.java
index b2c797309d..249cd9fccd 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CreatePatchOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CreatePatchOperationTest.java
@@ -171,12 +171,18 @@ public class CreatePatchOperationTest extends GitTestCase {
assertPatch(SIMPLE_ONELINE_PATCH_CONTENT, patchContent);
}
- @Test(expected = IllegalStateException.class)
+ @Test
public void testFirstCommit() throws Exception {
CreatePatchOperation operation = new CreatePatchOperation(
testRepository.getRepository(), commit);
+ operation.setHeaderFormat(DiffHeaderFormat.ONELINE);
operation.execute(null);
+ String patchContent = operation.getPatchContent();
+ assertPatch("5d67e6eaa2464d15c4216a93a0e7180ec905a2bb new file\n"
+ + "diff --git a/test-file b/test-file\n"
+ + "new file mode 100644\nindex 0000000..e69de29\n"
+ + "--- /dev/null\n" + "+++ b/test-file", patchContent);
}
@SuppressWarnings("unused")

Back to the top