]> source.dussan.org Git - jgit.git/commitdiff
Add lazy loading of body for tags to PlotWalk 50/6150/3
authorStefan Lay <stefan.lay@sap.com>
Fri, 11 May 2012 09:18:36 +0000 (11:18 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 3 Jun 2012 23:20:38 +0000 (01:20 +0200)
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>
org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java

index 8323d2fe255a355245f2fc2e32af767c5f078e27..55cf235cf90fc9e291b40a916df3082504c75a64 100644 (file)
@@ -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;
                        }