Skip to content

Added support for git_cred_ssh_key_memory_new GTCredentials #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 13, 2015

Conversation

slavikus
Copy link
Contributor

Added +[GTCredential credentialWithUserName:publicKeyString:privateKeyString:passphrase:error:] to support libgit2 git_cred_ssh_key_memory_new() credentials.

Added +[GTCredential credentialWithUserName:publicKeyString:privateKeyString:passphrase:error:] to support libgit2 git_cred_ssh_key_memory_new() credentials.
@joshaber joshaber self-assigned this Aug 13, 2015
@@ -74,6 +74,18 @@ NS_ASSUME_NONNULL_BEGIN
/// Return a new GTCredential instance, or nil if an error occurred
+ (nullable instancetype)credentialWithUserName:(NSString *)userName publicKeyURL:(nullable NSURL *)publicKeyURL privateKeyURL:(NSURL *)privateKeyURL passphrase:(nullable NSString *)passphrase error:(NSError **)error;

/// Create a credential object from a SSH keyfile data string
///
/// userName - The username to authenticate as. Must not be nil.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happily I think we can stop writing nilability in the comments, since nullable indicates it!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree; but I tried to follow whatever was in the similar function above :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's always the best route to take! But happily standards change.

@joshaber
Copy link
Member

This looks great, thanks! Just a couple nits to pick.

Fixed indentation on one of the lines (was a tad off);
Removed references to nilability as nullable keyword indicates that. Didn't touch other functions I didn't author.
@slavikus
Copy link
Contributor Author

There you go. :)

@joshaber
Copy link
Member

🤘

joshaber added a commit that referenced this pull request Aug 13, 2015
Added support for git_cred_ssh_key_memory_new GTCredentials
@joshaber joshaber merged commit f26c5c2 into libgit2:master Aug 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants