summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-09-14 18:59:38 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2012-09-14 18:59:38 -0400
commit28adbb350023645a9ca06af53f97d191d692a691 (patch)
tree481f383701e44a4961c827734b7515774f06d3aa /org.eclipse.jgit
parent187101808c7a2cf44494d32aa482cd8f84592c10 (diff)
parent833fd094420f1b28623aa565c2d20de76e3409eb (diff)
downloadjgit-28adbb350023645a9ca06af53f97d191d692a691.tar.gz
jgit-28adbb350023645a9ca06af53f97d191d692a691.zip
Merge "Ignore non-commit refs when in RevWalkUtils.findBranchesReachableFrom"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java
index 83f5f924e5..f223dea445 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java
@@ -165,7 +165,10 @@ public final class RevWalkUtils {
final int SKEW = 24*3600; // one day clock skew
for (Ref ref : refs) {
- RevCommit headCommit = revWalk.parseCommit(ref.getObjectId());
+ RevObject maybehead = revWalk.parseAny(ref.getObjectId());
+ if (!(maybehead instanceof RevCommit))
+ continue;
+ RevCommit headCommit = (RevCommit) maybehead;
// if commit is in the ref branch, then the tip of ref should be
// newer than the commit we are looking for. Allow for a large