Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.mylyn.ui/src/org')
-rw-r--r--org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
index e9f0c2e97a..f201fdab91 100644
--- a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
+++ b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
@@ -24,6 +24,8 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.egit.core.Activator;
import org.eclipse.egit.internal.mylyn.ui.EGitMylynUI;
import org.eclipse.egit.ui.internal.synchronize.model.GitModelCommit;
+import org.eclipse.egit.ui.internal.synchronize.model.GitModelRepository;
+import org.eclipse.jgit.lib.AbbreviatedObjectId;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Repository;
@@ -119,7 +121,14 @@ public class TaskReferenceFactory implements IAdapterFactory {
commit = (RevCommit) element;
else if (element instanceof GitModelCommit) {
GitModelCommit modelCommit = (GitModelCommit) element;
- commit = modelCommit.getBaseCommit();
+ if (!(modelCommit.getParent() instanceof GitModelRepository))
+ return null; // should never happen
+
+ GitModelRepository parent = (GitModelRepository) modelCommit.getParent();
+ Repository repo = parent.getRepository();
+ AbbreviatedObjectId id = modelCommit.getCachedCommitObj().getId();
+
+ commit = new RevWalk(repo).lookupCommit(id.toObjectId());
}
return commit;
}

Back to the top