[gitg/commit] Update for new lookup
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/commit] Update for new lookup
- Date: Sat, 29 Jun 2013 18:00:49 +0000 (UTC)
commit 5de5aab6827c5b4736a33601af65f2f32795a9f7
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sat Jun 29 19:53:57 2013 +0200
Update for new lookup
libgitg/tests/repository.vala | 5 ++---
plugins/files/gitg-files.vala | 2 +-
plugins/history/gitg-history.vala | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
---
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 b31b470..00d839f 100644
--- a/plugins/files/gitg-files.vala
+++ b/plugins/files/gitg-files.vala
@@ -264,7 +264,7 @@ namespace GitgFiles
try
{
- blob = application.repository.lookup(id, typeof(Ggit.Blob)) as Ggit.Blob;
+ blob = application.repository.lookup<Ggit.Blob>(id);
}
catch
{
diff --git a/plugins/history/gitg-history.vala b/plugins/history/gitg-history.vala
index 9665a2a..70c3fb4 100644
--- a/plugins/history/gitg-history.vala
+++ b/plugins/history/gitg-history.vala
@@ -266,7 +266,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 {}
@@ -293,7 +293,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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]