[gitg: 3/7] Small updates for new API
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg: 3/7] Small updates for new API
- Date: Thu, 30 Jul 2015 22:59:27 +0000 (UTC)
commit 67b3180a222dab3da8497ca59e01e767a08fc371
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Fri Jul 31 00:56:14 2015 +0200
Small updates for new API
gitg/gitg-commit-action-create-branch.vala | 12 +-----------
gitg/gitg-ref-action-fetch.vala | 14 +-------------
gitg/gitg-ref-action-rename.vala | 12 +-----------
3 files changed, 3 insertions(+), 35 deletions(-)
---
diff --git a/gitg/gitg-commit-action-create-branch.vala b/gitg/gitg-commit-action-create-branch.vala
index 018db6e..2c2d6c7 100644
--- a/gitg/gitg-commit-action-create-branch.vala
+++ b/gitg/gitg-commit-action-create-branch.vala
@@ -61,24 +61,14 @@ class CommitActionCreateBranch : GitgExt.UIElement, GitgExt.Action, GitgExt.Comm
if (resp == Gtk.ResponseType.OK)
{
Ggit.Branch? branch = null;
- Ggit.Signature? author = null;
var repo = application.repository;
try
{
- author = repo.get_signature_with_environment(application.environment);
- } catch {}
-
- var id = commit.get_id().to_string();
-
- try
- {
branch = repo.create_branch(dlg.new_branch_name,
commit,
- Ggit.CreateFlags.NONE,
- author,
- @"branch: Created from $(id)");
+ Ggit.CreateFlags.NONE);
}
catch (Error e)
{
diff --git a/gitg/gitg-ref-action-fetch.vala b/gitg/gitg-ref-action-fetch.vala
index 22b3803..ba5b8e5 100644
--- a/gitg/gitg-ref-action-fetch.vala
+++ b/gitg/gitg-ref-action-fetch.vala
@@ -92,18 +92,6 @@ class RefActionFetch : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction, Obj
public void activate()
{
- Ggit.Signature sig;
-
- try
- {
- sig = application.repository.get_signature_with_environment(application.environment);
- }
- catch (Error e)
- {
- stderr.printf("Failed to get signature: %s\n", e.message);
- return;
- }
-
var notification = new RemoteNotification(d_remote);
application.notifications.add(notification);
@@ -124,7 +112,7 @@ class RefActionFetch : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction, Obj
}
});
- d_remote.fetch.begin(sig, null, (obj, res) =>{
+ d_remote.fetch.begin(null, null, (obj, res) =>{
try
{
d_remote.fetch.end(res);
diff --git a/gitg/gitg-ref-action-rename.vala b/gitg/gitg-ref-action-rename.vala
index 2bf6c4d..098de69 100644
--- a/gitg/gitg-ref-action-rename.vala
+++ b/gitg/gitg-ref-action-rename.vala
@@ -111,19 +111,10 @@ class RefActionRename : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction, Ob
try
{
- var app = action_interface.application;
- var repo = app.repository;
- var signature = repo.get_signature_with_environment(app.environment);
-
if (branch != null)
{
- var msg = "rename: branch %s to %s".printf(branch.get_name(),
- new_text);
-
new_ref = branch.move(new_text,
- Ggit.CreateFlags.NONE,
- signature,
- msg) as Gitg.Ref;
+ Ggit.CreateFlags.NONE) as Gitg.Ref;
}
else
{
@@ -132,7 +123,6 @@ class RefActionRename : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction, Ob
new_ref = reference.rename(new_text,
false,
- signature,
msg) as Gitg.Ref;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]