Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index addca61eeb..52d0c5a321 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -1009,10 +1009,6 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
return false;
db = null;
- if (currentWalk != null) {
- currentWalk.release();
- currentWalk = null;
- }
final ArrayList<String> paths = new ArrayList<String>(in.length);
for (final IResource r : in) {
@@ -1054,7 +1050,7 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
return false;
}
- if (pathChange(pathFilters, paths)
+ if (pathChange(pathFilters, paths) || currentWalk == null
|| headId != null && !headId.equals(currentHeadId)) {
// TODO Do not dispose SWTWalk just because HEAD changed
// In theory we should be able to update the graph and
@@ -1062,6 +1058,8 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
// HEAD^1 and the old HEAD commit should not be visible.
//
currentHeadId = headId;
+ if (currentWalk != null)
+ currentWalk.release();
currentWalk = new SWTWalk(db);
currentWalk.sort(RevSort.COMMIT_TIME_DESC, true);
currentWalk.sort(RevSort.BOUNDARY, true);

Back to the top