diff options
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java index 94af81e812..9f92c045c0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java @@ -59,6 +59,7 @@ import org.eclipse.jgit.lib.RepositoryState; import org.eclipse.jgit.lib.RepositoryTestCase; import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason; import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.storage.file.ReflogReader; import org.junit.Test; /** @@ -223,5 +224,14 @@ public class CherryPickCommandTest extends RepositoryTestCase { // index shall be unchanged assertEquals(indexState, indexState(CONTENT)); assertEquals(RepositoryState.SAFE, db.getRepositoryState()); + + if (reason == null) { + ReflogReader reader = db.getReflogReader(Constants.HEAD); + assertTrue(reader.getLastEntry().getComment() + .startsWith("cherry-pick: ")); + reader = db.getReflogReader(db.getBranch()); + assertTrue(reader.getLastEntry().getComment() + .startsWith("cherry-pick: ")); + } } } |