[gitg/wip/commit: 9/28] Update for new lookup



commit c6d97d8c4c1261bd23005a2ae68e0a470273efea
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Jun 29 19:53:57 2013 +0200

    Update for new lookup

 gitg/history/gitg-history.vala |    4 ++--
 libgitg/tests/repository.vala  |    5 ++---
 plugins/files/gitg-files.vala  |    2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gitg/history/gitg-history.vala b/gitg/history/gitg-history.vala
index 47c4ddf..a0a5e93 100644
--- a/gitg/history/gitg-history.vala
+++ b/gitg/history/gitg-history.vala
@@ -256,7 +256,7 @@ namespace GitgHistory
                                        // See to resolve to the commit
                                        try
                                        {
-                                               var t = application.repository.lookup(id, typeof(Ggit.Tag)) 
as Ggit.Tag;
+                                               var t = application.repository.lookup<Ggit.Tag>(id);
 
                                                id = t.get_target_id();
                                        } catch {}
@@ -283,7 +283,7 @@ namespace GitgHistory
 
                                                try
                                                {
-                                                       var t = 
application.repository.lookup(resolved.get_target(), typeof(Ggit.Tag)) as Ggit.Tag;
+                                                       var t = 
application.repository.lookup<Ggit.Tag>(resolved.get_target());
                                                        included += t.get_target_id();
                                                }
                                                catch
diff --git a/libgitg/tests/repository.vala b/libgitg/tests/repository.vala
index 8245355..e84bf02 100644
--- a/libgitg/tests/repository.vala
+++ b/libgitg/tests/repository.vala
@@ -152,7 +152,7 @@ class Gitg.Test.Repository : Gitg.Test.Test
 
                try
                {
-                       tree = (Ggit.Tree)d_repository.lookup(treeoid, typeof(Ggit.Tree));
+                       tree = d_repository.lookup<Ggit.Tree>(treeoid); 
                }
                catch (GLib.Error e)
                {
@@ -191,8 +191,7 @@ class Gitg.Test.Repository : Gitg.Test.Test
 
                try
                {
-                       d_last_commit = (Ggit.Commit)d_repository.lookup(commitoid,
-                                                                        typeof(Ggit.Commit));
+                       d_last_commit = d_repository.lookup<Ggit.Commit>(commitoid);
                }
                catch (GLib.Error e)
                {
diff --git a/plugins/files/gitg-files.vala b/plugins/files/gitg-files.vala
index ccbbc99..15fe8d0 100644
--- a/plugins/files/gitg-files.vala
+++ b/plugins/files/gitg-files.vala
@@ -227,7 +227,7 @@ namespace GitgFiles
 
                        try
                        {
-                               blob = application.repository.lookup(id, typeof(Ggit.Blob)) as Ggit.Blob;
+                               blob = application.repository.lookup<Ggit.Blob>(id);
                        }
                        catch
                        {


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