summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorArthur Baars <arthur@semmle.com>2013-03-31 15:28:47 +0100
committerArthur Baars <arthur@semmle.com>2013-03-31 15:36:47 +0100
commit35be98fb8ffb2b21144f23efc599505fa3d60dd7 (patch)
treec2378107c859eb08bed9245b7c5aaf04e5764e6b /org.eclipse.jgit.test
parent2b9c440fd1a08158b5e69d3a9e1a5bed4a17b286 (diff)
downloadjgit-35be98fb8ffb2b21144f23efc599505fa3d60dd7.tar.gz
jgit-35be98fb8ffb2b21144f23efc599505fa3d60dd7.zip
LogCommand.all(): filter out refs that do not refer to commit objects
1. I have authored 100% of the content I'm contributing, 2. I have the rights to donate the content to Eclipse, 3. I contribute the content under the EDL Change-Id: I48b1828e0b1304f76276ec07ebac7ee9f521b194
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java
index c6402e75ea..34432c588b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java
@@ -100,11 +100,17 @@ public class LogCommandTest extends RepositoryTestCase {
commits.add(git.commit().setMessage("initial commit").call());
TagCommand tagCmd = git.tag();
- tagCmd.setName("tagname");
+ tagCmd.setName("tagcommit");
tagCmd.setObjectId(commits.get(0));
tagCmd.setTagger(new PersonIdent(db));
Ref tag = tagCmd.call();
+ tagCmd = git.tag();
+ tagCmd.setName("tagtree");
+ tagCmd.setObjectId(commits.get(0).getTree());
+ tagCmd.setTagger(new PersonIdent(db));
+ tagCmd.call();
+
Iterator<RevCommit> log = git.log().all().call().iterator();
assertTrue(log.hasNext());
RevCommit commit = log.next();