summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
authorStefan Lay <stefan.lay@sap.com>2013-11-21 14:46:12 +0100
committerStefan Lay <stefan.lay@sap.com>2013-11-21 14:47:24 +0100
commit4feace2b9ecb90fe591c4317403f6d8e6309287e (patch)
tree2f992c1be8679fd25aac61972491f4dd08885bd0 /org.eclipse.jgit.test/tst
parent7dce16018e05c0a094b3eb20009e0438764f046e (diff)
downloadjgit-4feace2b9ecb90fe591c4317403f6d8e6309287e.tar.gz
jgit-4feace2b9ecb90fe591c4317403f6d8e6309287e.zip
Fix parsing Rebase todo lines when commit message is missing
Bug: 422253 Change-Id: I9739b16c91d2df31a481360a712d3479a4eeee2e Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
index 241d099d19..a3d652b737 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
@@ -1642,6 +1642,19 @@ public class RebaseCommandTest extends RepositoryTestCase {
}
@Test
+ public void testRebaseShouldBeAbleToHandleLinesWithoutCommitMessageInRebaseTodoFile()
+ throws IOException {
+ String todo = "pick 1111111 \n" + "pick 2222222 Commit 2\n"
+ + "# Comment line at end\n";
+ write(getTodoFile(), todo);
+
+ List<RebaseTodoLine> steps = db.readRebaseTodo(GIT_REBASE_TODO, false);
+ assertEquals(2, steps.size());
+ assertEquals("1111111", steps.get(0).getCommit().name());
+ assertEquals("2222222", steps.get(1).getCommit().name());
+ }
+
+ @Test
public void testRebaseShouldNotFailIfUserAddCommentLinesInPrepareSteps()
throws Exception {
commitFile(FILE1, FILE1, "master");