Skip to content

Commit

Permalink
Update to libgit2 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tiennou authored and hannesa2 committed Jun 20, 2022
1 parent d872ee9 commit 3933604
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion External/libgit2
Submodule libgit2 updated 699 files
2 changes: 1 addition & 1 deletion ObjectiveGit/GTCredential+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ typedef struct {
__unsafe_unretained GTCredentialProvider *credProvider;
} GTCredentialAcquireCallbackInfo;

int GTCredentialAcquireCallback(git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *payload);
int GTCredentialAcquireCallback(git_credential **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *payload);
14 changes: 7 additions & 7 deletions ObjectiveGit/GTCredential.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#import "git2/transport.h"

/// An enum describing the data needed for authentication.
/// See `git_credtype_t`.
/// See `git_credential_t`.
typedef NS_ENUM(NSInteger, GTCredentialType) {
GTCredentialTypeUserPassPlaintext = GIT_CREDTYPE_USERPASS_PLAINTEXT,
GTCredentialTypeSSHKey = GIT_CREDTYPE_SSH_KEY,
GTCredentialTypeSSHCustom = GIT_CREDTYPE_SSH_CUSTOM,
GTCredentialTypeUserPassPlaintext = GIT_CREDENTIAL_USERPASS_PLAINTEXT,
GTCredentialTypeSSHKey = GIT_CREDENTIAL_SSH_KEY,
GTCredentialTypeSSHCustom = GIT_CREDENTIAL_SSH_CUSTOM,
};

NS_ASSUME_NONNULL_BEGIN
Expand Down Expand Up @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
@end

/// The GTCredential class is used to provide authentication data.
/// It acts as a wrapper around `git_cred` objects.
/// It acts as a wrapper around `git_credential` objects.
@interface GTCredential : NSObject

/// Create a credential object from a username/password pair.
Expand Down Expand Up @@ -86,8 +86,8 @@ NS_ASSUME_NONNULL_BEGIN
/// Return a new GTCredential instance, or nil if an error occurred
+ (instancetype _Nullable)credentialWithUserName:(NSString *)userName publicKeyString:(NSString * _Nullable)publicKeyString privateKeyString:(NSString *)privateKeyString passphrase:(NSString * _Nullable)passphrase error:(NSError **)error;

/// The underlying `git_cred` object.
- (git_cred *)git_cred __attribute__((objc_returns_inner_pointer));
/// The underlying `git_credential` object.
- (git_credential *)git_credential __attribute__((objc_returns_inner_pointer));

@end

Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTRepository.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ typedef NS_ENUM(NSInteger, GTRepositoryStateType) {
/// May be NULL.
///
/// returns nil (and fills the error parameter) if an error occurred, or a GTRepository object if successful.
+ (instancetype _Nullable)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL options:(NSDictionary * _Nullable)options error:(NSError **)error transferProgressBlock:(void (^ _Nullable)(const git_transfer_progress *, BOOL *stop))transferProgressBlock;
+ (instancetype _Nullable)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL options:(NSDictionary * _Nullable)options error:(NSError **)error transferProgressBlock:(void (^ _Nullable)(const git_indexer_progress *, BOOL *stop))transferProgressBlock;

/// Lookup objects in the repo by oid or sha1
- (id _Nullable)lookUpObjectByOID:(GTOID *)oid objectType:(GTObjectType)type error:(NSError **)error;
Expand Down

0 comments on commit 3933604

Please sign in to comment.