[gitg/vala] Set sort mode before setting include/exclude



commit 92a1cc6696c43d6ea10d023b4bcc665e33d6129e
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Sun Apr 15 14:56:30 2012 +0200

    Set sort mode before setting include/exclude
    
    Setting the sort mode will reset the walker and thus would
    undo setting include/exclude

 libgitg/gitg-commit-model.vala |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libgitg/gitg-commit-model.vala b/libgitg/gitg-commit-model.vala
index 54024da..50015b6 100644
--- a/libgitg/gitg-commit-model.vala
+++ b/libgitg/gitg-commit-model.vala
@@ -167,6 +167,8 @@ public class CommitModel : Object
 				try
 				{
 					d_walker = new Ggit.RevisionWalker(d_repository);
+					d_walker.set_sort_mode(Ggit.SortMode.TOPOLOGICAL |
+					                       Ggit.SortMode.TIME);
 				}
 				catch
 				{
@@ -193,9 +195,6 @@ public class CommitModel : Object
 				} catch {};
 			}
 
-			d_walker.set_sort_mode(Ggit.SortMode.TOPOLOGICAL |
-			                       Ggit.SortMode.TIME);
-
 			uint size;
 
 			// Pre-allocate array to store commits



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]