diff options
author | Robin Rosenberg | 2014-06-29 21:24:07 +0000 |
---|---|---|
committer | Robin Rosenberg | 2014-08-02 23:16:23 +0000 |
commit | 1cc69e2673ee4c78382eac1bc2d6e13372ea72cb (patch) | |
tree | d2631b60800efb1f607f3e2a4fcf7eab93e0af0d /org.eclipse.egit.core.test | |
parent | 7183e9296f19e8d9416ed60e80cce312895a66e9 (diff) | |
download | egit-1cc69e2673ee4c78382eac1bc2d6e13372ea72cb.tar.gz egit-1cc69e2673ee4c78382eac1bc2d6e13372ea72cb.tar.xz egit-1cc69e2673ee4c78382eac1bc2d6e13372ea72cb.zip |
Enable Create Patch for first commit in the history view
Change-Id: Ibea61c875a3eafae624b0ec13cfb9d9b1f8e4e19
Diffstat (limited to 'org.eclipse.egit.core.test')
-rw-r--r-- | org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/CreatePatchOperationTest.java | 8 |
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") |