diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-09-08 12:07:24 +0200 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-09-08 12:08:07 +0200 |
commit | 833fd094420f1b28623aa565c2d20de76e3409eb (patch) | |
tree | 7371ba65ae531d103fb89a198afb037f13e7324e /org.eclipse.jgit | |
parent | e63f1c94f8f9a5b10da6c1e5932da33eb805230a (diff) | |
download | jgit-833fd094420f1b28623aa565c2d20de76e3409eb.tar.gz jgit-833fd094420f1b28623aa565c2d20de76e3409eb.zip |
Ignore non-commit refs when in RevWalkUtils.findBranchesReachableFrom
This methods is for finding branches only.
Change-Id: Ic68b5295ff814401890f0592ae95851554706ca6
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java | 5 |
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 |