summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Lay <stefan.lay@sap.com>2012-05-11 11:18:36 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2012-06-04 01:20:38 +0200
commitf0df18ff4f9fbf91d5ed30fe5bb600fcec95c90f (patch)
treea94df80ad6d48f2def7beacb28f20074682e15b6
parent725329a0b9b1d2e79e27739f33a8e5ff91cc9993 (diff)
downloadjgit-f0df18ff4f9fbf91d5ed30fe5bb600fcec95c90f.tar.gz
jgit-f0df18ff4f9fbf91d5ed30fe5bb600fcec95c90f.zip
Add lazy loading of body for tags to PlotWalk
This change is required by egit's lazy loading of the body in the history view when the walk is started with setRetainBody(false). Change-Id: I9291ba8c34c8744bc009b1bd302ed28bfa4e9476 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java
index 8323d2fe25..55cf235cf9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java
@@ -172,6 +172,11 @@ public class PlotWalk extends RevWalk {
return ((RevCommit) o).getCommitTime();
if (o instanceof RevTag) {
RevTag tag = (RevTag) o;
+ try {
+ parseBody(tag);
+ } catch (IOException e) {
+ return 0;
+ }
PersonIdent who = tag.getTaggerIdent();
return who != null ? who.getWhen().getTime() : 0;
}