[gitg] Fix credentials signature
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Fix credentials signature
- Date: Wed, 24 Dec 2014 09:06:50 +0000 (UTC)
commit 5c1bb0116808cf108703264ed4442800dd02651b
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Wed Dec 24 10:02:01 2014 +0100
Fix credentials signature
gitg/gitg-remote-manager.vala | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gitg/gitg-remote-manager.vala b/gitg/gitg-remote-manager.vala
index ed67160..a7d1a09 100644
--- a/gitg/gitg-remote-manager.vala
+++ b/gitg/gitg-remote-manager.vala
@@ -48,27 +48,24 @@ class RemoteManager : Object, GitgExt.RemoteLookup
d_window = window;
}
- protected override bool credentials(string url,
- string username,
- Ggit.Credtype allowed_types,
- out Ggit.Cred cred) throws Error
+ protected override Ggit.Cred? credentials(string url,
+ string? username,
+ Ggit.Credtype allowed_types) throws Error
{
- cred = null;
-
if ((allowed_types & Ggit.Credtype.SSH_KEY) != 0)
{
- cred = new Ggit.CredSshKeyFromAgent(username);
+ return new Ggit.CredSshKeyFromAgent(username);
}
else if ((allowed_types & Ggit.Credtype.SSH_INTERACTIVE) != 0)
{
- cred = new CredSshInteractive(username);
+ return new CredSshInteractive(username);
}
else if ((allowed_types & Ggit.Credtype.USERPASS_PLAINTEXT) != 0)
{
// TODO: query for user + pass
}
- return cred != null;
+ return null;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]