]> source.dussan.org Git - jgit.git/commitdiff
Rebase Interoperability first part: write "interactive" file 84/1984/1
authorMathias Kinzler <mathias.kinzler@sap.com>
Wed, 1 Dec 2010 14:08:07 +0000 (15:08 +0100)
committerMathias Kinzler <mathias.kinzler@sap.com>
Wed, 1 Dec 2010 14:08:07 +0000 (15:08 +0100)
The Repository is then in state "Rebase interactive".

Change-Id: I5d2de57f8670e1d4c71ed22509ab17f04e2561b5
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java

index 2e04cdb1bd4b601fba99f43d936de7bc91114800..d1d3480b23a574011ccbd18ea576fc4f0ff33471 100644 (file)
@@ -322,7 +322,8 @@ public class RebaseCommandTest extends RepositoryTestCase {
                checkFile(theFile,
                                "<<<<<<< OURS\n1master\n=======\n1topic\n>>>>>>> THEIRS\n2\n3\ntopic4\n");
 
-               assertEquals(RepositoryState.REBASING_MERGE, db.getRepositoryState());
+               assertEquals(RepositoryState.REBASING_INTERACTIVE, db
+                               .getRepositoryState());
                assertTrue(new File(db.getDirectory(), "rebase-merge").exists());
                // the first one should be included, so we should have left two picks in
                // the file
@@ -410,7 +411,8 @@ public class RebaseCommandTest extends RepositoryTestCase {
                assertEquals(Status.STOPPED, res.getStatus());
                assertEquals(conflicting, res.getCurrentCommit());
 
-               assertEquals(RepositoryState.REBASING_MERGE, db.getRepositoryState());
+               assertEquals(RepositoryState.REBASING_INTERACTIVE, db
+                               .getRepositoryState());
                assertTrue(new File(db.getDirectory(), "rebase-merge").exists());
                // the first one should be included, so we should have left two picks in
                // the file
index f92459041748bb74d693055326c9cfd41664bb04..45c66e57b8946ecf91869b0b7e706e1ac7623488 100644 (file)
@@ -325,6 +325,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
                createFile(rebaseDir, "head", headId.name());
                createFile(rebaseDir, "head-name", headName);
                createFile(rebaseDir, "onto", upstreamCommit.name());
+               createFile(rebaseDir, "interactive", "");
                BufferedWriter fw = new BufferedWriter(new OutputStreamWriter(
                                new FileOutputStream(new File(rebaseDir, "git-rebase-todo")),
                                "UTF-8"));