diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2011-09-08 19:42:19 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2011-09-21 23:36:55 +0200 |
commit | ad50a0b7c017b6e06614aae151ffefdc0f26ea29 (patch) | |
tree | 161af931d7c1cd0f9db43573a8b524f3e784583b /org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java | |
parent | 39ad503fcb0c293e9c6d47d653a0d52456d4760b (diff) | |
download | jgit-ad50a0b7c017b6e06614aae151ffefdc0f26ea29.tar.gz jgit-ad50a0b7c017b6e06614aae151ffefdc0f26ea29.zip |
Test the reflog message for commit, cherry-pick, revert and merge
Change-Id: I319f09577b3e04f6c31399fe8e57e9a9ad2c8a6c
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
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: ")); + } } } |