Skip to content

Commit 2a3d46b

Browse files
committed
Fix warning about missing ownership on NSError.
1 parent 4a4cdac commit 2a3d46b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+413
-413
lines changed

ObjectiveGit/Categories/NSData+Git.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@interface NSData (Git)
1010

1111
+ (NSData *)git_dataWithOid:(git_oid *)oid;
12-
- (BOOL)git_getOid:(git_oid *)oid error:(NSError **)error;
12+
- (BOOL)git_getOid:(git_oid *)oid error:(NSError *__autoreleasing *)error;
1313

1414
/// Creates an NSData object that will take ownership of a libgit2 buffer.
1515
///

ObjectiveGit/Categories/NSData+Git.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ + (NSData *)git_dataWithOid:(git_oid *)oid {
1313
return [NSData dataWithBytes:oid length:sizeof(git_oid)];
1414
}
1515

16-
- (BOOL)git_getOid:(git_oid *)oid error:(NSError **)error {
16+
- (BOOL)git_getOid:(git_oid *)oid error:(NSError *__autoreleasing *)error {
1717
if ([self length] != sizeof(git_oid)) {
1818
if (error != NULL) {
1919
*error = [NSError errorWithDomain:GTGitErrorDomain

ObjectiveGit/GTBlob.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
4343
/// error - Will be set if an error occurs. This may be nil.
4444
///
4545
/// Return a newly created blob object, or nil if an error occurs.
46-
+ (instancetype _Nullable)blobWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError **)error;
46+
+ (instancetype _Nullable)blobWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error;
4747

4848
/// Creates a new blob from the given data.
4949
///
@@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
5454
/// error - Will be set if an error occurs. This may be nil.
5555
///
5656
/// Return a newly created blob object, or nil if an error occurs.
57-
+ (instancetype _Nullable)blobWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError **)error;
57+
+ (instancetype _Nullable)blobWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error;
5858

5959
/// Creates a new blob given an NSURL to a file.
6060
///
@@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
6565
/// error - Will be set if an error occurs. This may be nil.
6666
///
6767
/// Return a newly created blob object, or nil if an error occurs.
68-
+ (instancetype _Nullable)blobWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError **)error;
68+
+ (instancetype _Nullable)blobWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error;
6969

7070
/// Creates a new blob from the given string.
7171
///
@@ -76,7 +76,7 @@ NS_ASSUME_NONNULL_BEGIN
7676
/// error - Will be set if an error occurs. This may be nil.
7777
///
7878
/// Return a newly created blob object, or nil if an error occurs.
79-
- (instancetype _Nullable)initWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError **)error;
79+
- (instancetype _Nullable)initWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error;
8080

8181
/// Creates a new blob from the passed data.
8282
///
@@ -87,7 +87,7 @@ NS_ASSUME_NONNULL_BEGIN
8787
/// error - Will be set if an error occurs. This may be nil.
8888
///
8989
/// Returns a newly created blob object, or nil if an error occurs.
90-
- (instancetype _Nullable)initWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError **)error;
90+
- (instancetype _Nullable)initWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error;
9191

9292
/// Creates a new blob from the specified file.
9393
///
@@ -98,7 +98,7 @@ NS_ASSUME_NONNULL_BEGIN
9898
/// error - Will be set if an error occurs. This may be nil.
9999
///
100100
/// Returns a newly created blob object, or nil if an error occurs.
101-
- (instancetype _Nullable)initWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError **)error;
101+
- (instancetype _Nullable)initWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error;
102102

103103
/// The underlying `git_object` as a `git_blob` object.
104104
- (git_blob *)git_blob __attribute__((objc_returns_inner_pointer));
@@ -113,7 +113,7 @@ NS_ASSUME_NONNULL_BEGIN
113113
/// error - If not NULL, set to any error that occurs.
114114
///
115115
/// Returns the filtered data, or nil if an error occurs.
116-
- (NSData * _Nullable)applyFiltersForPath:(NSString *)path error:(NSError **)error;
116+
- (NSData * _Nullable)applyFiltersForPath:(NSString *)path error:(NSError *__autoreleasing *)error;
117117

118118
@end
119119

ObjectiveGit/GTBlob.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ - (NSString *)description {
4646

4747
#pragma mark API
4848

49-
+ (instancetype)blobWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError **)error {
49+
+ (instancetype)blobWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error {
5050
return [[self alloc] initWithString:string inRepository:repository error:error];
5151
}
5252

53-
+ (instancetype)blobWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError **)error {
53+
+ (instancetype)blobWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error {
5454
return [[self alloc] initWithData:data inRepository:repository error:error];
5555
}
5656

57-
+ (instancetype)blobWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError **)error {
57+
+ (instancetype)blobWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error {
5858
return [[self alloc] initWithFile:file inRepository:repository error:error];
5959
}
6060

61-
- (instancetype)initWithOid:(const git_oid *)oid inRepository:(GTRepository *)repository error:(NSError **)error {
61+
- (instancetype)initWithOid:(const git_oid *)oid inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error {
6262
NSParameterAssert(oid != NULL);
6363
NSParameterAssert(repository != nil);
6464

@@ -74,12 +74,12 @@ - (instancetype)initWithOid:(const git_oid *)oid inRepository:(GTRepository *)re
7474
return [self initWithObj:obj inRepository:repository];
7575
}
7676

77-
- (instancetype)initWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError **)error {
77+
- (instancetype)initWithString:(NSString *)string inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error {
7878
NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
7979
return [self initWithData:data inRepository:repository error:error];
8080
}
8181

82-
- (instancetype)initWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError **)error {
82+
- (instancetype)initWithData:(NSData *)data inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error {
8383
NSParameterAssert(data != nil);
8484
NSParameterAssert(repository != nil);
8585

@@ -95,7 +95,7 @@ - (instancetype)initWithData:(NSData *)data inRepository:(GTRepository *)reposit
9595
return [self initWithOid:&oid inRepository:repository error:error];
9696
}
9797

98-
- (instancetype)initWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError **)error {
98+
- (instancetype)initWithFile:(NSURL *)file inRepository:(GTRepository *)repository error:(NSError *__autoreleasing *)error {
9999
NSParameterAssert(file != nil);
100100
NSParameterAssert(repository != nil);
101101

@@ -133,7 +133,7 @@ - (NSData *)data {
133133
return [NSData dataWithBytes:git_blob_rawcontent(self.git_blob) length:(NSUInteger)s];
134134
}
135135

136-
- (NSData *)applyFiltersForPath:(NSString *)path error:(NSError **)error {
136+
- (NSData *)applyFiltersForPath:(NSString *)path error:(NSError *__autoreleasing *)error {
137137
NSCParameterAssert(path != nil);
138138

139139
git_buf buffer = GIT_BUF_INIT_CONST(0, NULL);

ObjectiveGit/GTBranch.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,33 +76,33 @@ NS_ASSUME_NONNULL_BEGIN
7676
/// error(out) - will be filled if an error occurs
7777
///
7878
/// returns a GTCommit object or nil if an error occurred
79-
- (GTCommit * _Nullable)targetCommitWithError:(NSError **)error;
79+
- (GTCommit * _Nullable)targetCommitWithError:(NSError *__autoreleasing *)error;
8080

8181
/// Renames the branch. Setting `force` to YES to delete another branch with the same name.
82-
- (BOOL)rename:(NSString *)name force:(BOOL)force error:(NSError **)error;
82+
- (BOOL)rename:(NSString *)name force:(BOOL)force error:(NSError *__autoreleasing *)error;
8383

8484
/// Count all commits in this branch
8585
///
8686
/// error(out) - will be filled if an error occurs
8787
///
8888
/// returns number of commits in the branch or NSNotFound if an error occurred
89-
- (NSUInteger)numberOfCommitsWithError:(NSError **)error;
89+
- (NSUInteger)numberOfCommitsWithError:(NSError *__autoreleasing *)error;
9090

9191
/// Get unique commits
9292
///
9393
/// otherBranch -
9494
/// error - If not NULL, set to any error that occurs.
9595
///
9696
/// Returns a (possibly empty) array of GTCommits, or nil if an error occurs.
97-
- (NSArray<GTCommit *> * _Nullable)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error;
97+
- (NSArray<GTCommit *> * _Nullable)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError *__autoreleasing *)error;
9898

9999
/// Deletes the local branch and nils out the reference.
100-
- (BOOL)deleteWithError:(NSError **)error;
100+
- (BOOL)deleteWithError:(NSError *__autoreleasing *)error;
101101

102102
/// If the receiver is a local branch, looks up and returns its tracking branch.
103103
/// If the receiver is a remote branch, returns self. If no tracking branch was
104104
/// found, returns nil and sets `success` to YES.
105-
- (GTBranch * _Nullable)trackingBranchWithError:(NSError **)error success:(BOOL * _Nullable)success;
105+
- (GTBranch * _Nullable)trackingBranchWithError:(NSError *__autoreleasing *)error success:(BOOL * _Nullable)success;
106106

107107
/// Update the tracking branch.
108108
///
@@ -111,7 +111,7 @@ NS_ASSUME_NONNULL_BEGIN
111111
/// error - The error if one occurred.
112112
///
113113
/// Returns whether it was successful.
114-
- (BOOL)updateTrackingBranch:(GTBranch * _Nullable)trackingBranch error:(NSError **)error;
114+
- (BOOL)updateTrackingBranch:(GTBranch * _Nullable)trackingBranch error:(NSError *__autoreleasing *)error;
115115

116116
/// Reloads the branch's reference and creates a new branch based off that newly
117117
/// loaded reference.
@@ -121,7 +121,7 @@ NS_ASSUME_NONNULL_BEGIN
121121
/// error - The error if one occurred.
122122
///
123123
/// Returns the reloaded branch, or nil if an error occurred.
124-
- (GTBranch * _Nullable)reloadedBranchWithError:(NSError **)error;
124+
- (GTBranch * _Nullable)reloadedBranchWithError:(NSError *__autoreleasing *)error;
125125

126126
/// Calculate the ahead/behind count from this branch to the given branch.
127127
///
@@ -132,7 +132,7 @@ NS_ASSUME_NONNULL_BEGIN
132132
/// error - The error if one occurs.
133133
///
134134
/// Returns whether the calculation was successful.
135-
- (BOOL)calculateAhead:(size_t *)ahead behind:(size_t *)behind relativeTo:(GTBranch *)branch error:(NSError **)error;
135+
- (BOOL)calculateAhead:(size_t *)ahead behind:(size_t *)behind relativeTo:(GTBranch *)branch error:(NSError *__autoreleasing *)error;
136136

137137
@end
138138

ObjectiveGit/GTBranch.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ - (NSString *)remoteName {
123123
return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
124124
}
125125

126-
- (GTCommit *)targetCommitWithError:(NSError **)error {
126+
- (GTCommit *)targetCommitWithError:(NSError *__autoreleasing *)error {
127127
GTOID *oid = self.OID;
128128
if (oid == nil) {
129129
if (error != NULL) *error = GTReference.invalidReferenceError;
@@ -133,7 +133,7 @@ - (GTCommit *)targetCommitWithError:(NSError **)error {
133133
return [self.repository lookUpObjectByOID:oid objectType:GTObjectTypeCommit error:error];
134134
}
135135

136-
- (NSUInteger)numberOfCommitsWithError:(NSError **)error {
136+
- (NSUInteger)numberOfCommitsWithError:(NSError *__autoreleasing *)error {
137137
GTEnumerator *enumerator = [[GTEnumerator alloc] initWithRepository:self.repository error:error];
138138
if (enumerator == nil) return NSNotFound;
139139

@@ -160,14 +160,14 @@ - (BOOL)isHEAD {
160160
return (git_branch_is_head(self.reference.git_reference) ? YES : NO);
161161
}
162162

163-
- (NSArray *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error {
163+
- (NSArray *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError *__autoreleasing *)error {
164164
GTOID *oid = self.OID;
165165
GTOID *otherOID = otherBranch.OID;
166166
GTEnumerator *enumerator = [self.repository enumeratorForUniqueCommitsFromOID:oid relativeToOID:otherOID error:error];
167167
return [enumerator allObjectsWithError:error];
168168
}
169169

170-
- (BOOL)deleteWithError:(NSError **)error {
170+
- (BOOL)deleteWithError:(NSError *__autoreleasing *)error {
171171
int gitError = git_branch_delete(self.reference.git_reference);
172172
if (gitError != GIT_OK) {
173173
if(error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to delete branch %@", self.name];
@@ -177,7 +177,7 @@ - (BOOL)deleteWithError:(NSError **)error {
177177
return YES;
178178
}
179179

180-
- (BOOL)rename:(NSString *)name force:(BOOL)force error:(NSError **)error {
180+
- (BOOL)rename:(NSString *)name force:(BOOL)force error:(NSError *__autoreleasing *)error {
181181
git_reference *git_ref;
182182
int gitError = git_branch_move(&git_ref, self.reference.git_reference, name.UTF8String, (force ? 1 : 0));
183183
if (gitError != GIT_OK) {
@@ -192,7 +192,7 @@ - (BOOL)rename:(NSString *)name force:(BOOL)force error:(NSError **)error {
192192
return YES;
193193
}
194194

195-
- (GTBranch *)trackingBranchWithError:(NSError **)error success:(BOOL *)success {
195+
- (GTBranch *)trackingBranchWithError:(NSError *__autoreleasing *)error success:(BOOL *)success {
196196
BOOL underSuccess = NO;
197197
if (success == NULL) {
198198
success = &underSuccess;
@@ -236,7 +236,7 @@ - (GTBranch *)trackingBranchWithError:(NSError **)error success:(BOOL *)success
236236
return [[self class] branchWithReference:upsteamRef];
237237
}
238238

239-
- (BOOL)updateTrackingBranch:(GTBranch *)trackingBranch error:(NSError **)error {
239+
- (BOOL)updateTrackingBranch:(GTBranch *)trackingBranch error:(NSError *__autoreleasing *)error {
240240
int result = GIT_ENOTFOUND;
241241
if (trackingBranch.branchType == GTBranchTypeRemote) {
242242
result = git_branch_set_upstream(self.reference.git_reference, [trackingBranch.name stringByReplacingOccurrencesOfString:[GTBranch remoteNamePrefix] withString:@""].UTF8String);
@@ -251,14 +251,14 @@ - (BOOL)updateTrackingBranch:(GTBranch *)trackingBranch error:(NSError **)error
251251
return YES;
252252
}
253253

254-
- (GTBranch *)reloadedBranchWithError:(NSError **)error {
254+
- (GTBranch *)reloadedBranchWithError:(NSError *__autoreleasing *)error {
255255
GTReference *reloadedRef = [self.reference reloadedReferenceWithError:error];
256256
if (reloadedRef == nil) return nil;
257257

258258
return [[self.class alloc] initWithReference:reloadedRef];
259259
}
260260

261-
- (BOOL)calculateAhead:(size_t *)ahead behind:(size_t *)behind relativeTo:(GTBranch *)branch error:(NSError **)error {
261+
- (BOOL)calculateAhead:(size_t *)ahead behind:(size_t *)behind relativeTo:(GTBranch *)branch error:(NSError *__autoreleasing *)error {
262262
GTOID *oid = self.OID;
263263
GTOID *branchOID = branch.OID;
264264
return [self.repository calculateAhead:ahead behind:behind ofOID:oid relativeToOID:branchOID error:error];

ObjectiveGit/GTCommit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
6666
///
6767
/// Returns an index which represents the result of the merge, or nil if an error
6868
/// occurred.
69-
- (GTIndex * _Nullable)merge:(GTCommit *)otherCommit error:(NSError **)error;
69+
- (GTIndex * _Nullable)merge:(GTCommit *)otherCommit error:(NSError *__autoreleasing *)error;
7070

7171
@end
7272

ObjectiveGit/GTCommit.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ - (NSArray *)parents {
151151

152152
#pragma mark Merging
153153

154-
- (GTIndex *)merge:(GTCommit *)otherCommit error:(NSError **)error {
154+
- (GTIndex *)merge:(GTCommit *)otherCommit error:(NSError *__autoreleasing *)error {
155155
NSParameterAssert(otherCommit != nil);
156156

157157
git_index *index;

ObjectiveGit/GTConfiguration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
4545
- (void)setInt64:(int64_t)i forKey:(NSString *)key;
4646
- (int64_t)int64ForKey:(NSString *)key;
4747

48-
- (BOOL)deleteValueForKey:(NSString *)key error:(NSError **)error;
48+
- (BOOL)deleteValueForKey:(NSString *)key error:(NSError *__autoreleasing *)error;
4949

5050
@end
5151

ObjectiveGit/GTConfiguration.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ - (int64_t)int64ForKey:(NSString *)key {
103103
return i;
104104
}
105105

106-
- (BOOL)deleteValueForKey:(NSString *)key error:(NSError **)error {
106+
- (BOOL)deleteValueForKey:(NSString *)key error:(NSError *__autoreleasing *)error {
107107
git_config_delete_entry(self.git_config, key.UTF8String);
108108

109109
return YES;

ObjectiveGit/GTCredential.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN
6060
/// error - If not NULL, set to any errors that occur.
6161
///
6262
/// Return a new GTCredential instance, or nil if an error occurred
63-
+ (instancetype _Nullable)credentialWithUserName:(NSString *)userName password:(NSString *)password error:(NSError **)error;
63+
+ (instancetype _Nullable)credentialWithUserName:(NSString *)userName password:(NSString *)password error:(NSError *__autoreleasing *)error;
6464

6565
/// Create a credential object from a SSH keyfile
6666
///
@@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN
7272
/// error - If not NULL, set to any errors that occur.
7373
///
7474
/// Return a new GTCredential instance, or nil if an error occurred
75-
+ (instancetype _Nullable)credentialWithUserName:(NSString *)userName publicKeyURL:(NSURL * _Nullable)publicKeyURL privateKeyURL:(NSURL *)privateKeyURL passphrase:(NSString * _Nullable)passphrase error:(NSError **)error;
75+
+ (instancetype _Nullable)credentialWithUserName:(NSString *)userName publicKeyURL:(NSURL * _Nullable)publicKeyURL privateKeyURL:(NSURL *)privateKeyURL passphrase:(NSString * _Nullable)passphrase error:(NSError *__autoreleasing *)error;
7676

7777
/// Create a credential object from a SSH keyfile data string
7878
///
@@ -84,7 +84,7 @@ NS_ASSUME_NONNULL_BEGIN
8484
/// error - If not NULL, set to any errors that occur.
8585
///
8686
/// Return a new GTCredential instance, or nil if an error occurred
87-
+ (instancetype _Nullable)credentialWithUserName:(NSString *)userName publicKeyString:(NSString * _Nullable)publicKeyString privateKeyString:(NSString *)privateKeyString passphrase:(NSString * _Nullable)passphrase error:(NSError **)error;
87+
+ (instancetype _Nullable)credentialWithUserName:(NSString *)userName publicKeyString:(NSString * _Nullable)publicKeyString privateKeyString:(NSString *)privateKeyString passphrase:(NSString * _Nullable)passphrase error:(NSError *__autoreleasing *)error;
8888

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

ObjectiveGit/GTCredential.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ @interface GTCredential ()
4444

4545
@implementation GTCredential
4646

47-
+ (instancetype)credentialWithUserName:(NSString *)userName password:(NSString *)password error:(NSError **)error {
47+
+ (instancetype)credentialWithUserName:(NSString *)userName password:(NSString *)password error:(NSError *__autoreleasing *)error {
4848
git_cred *cred;
4949
int gitError = git_cred_userpass_plaintext_new(&cred, userName.UTF8String, password.UTF8String);
5050
if (gitError != GIT_OK) {
@@ -55,7 +55,7 @@ + (instancetype)credentialWithUserName:(NSString *)userName password:(NSString *
5555
return [[self alloc] initWithGitCred:cred];
5656
}
5757

58-
+ (instancetype)credentialWithUserName:(NSString *)userName publicKeyURL:(NSURL *)publicKeyURL privateKeyURL:(NSURL *)privateKeyURL passphrase:(NSString *)passphrase error:(NSError **)error {
58+
+ (instancetype)credentialWithUserName:(NSString *)userName publicKeyURL:(NSURL *)publicKeyURL privateKeyURL:(NSURL *)privateKeyURL passphrase:(NSString *)passphrase error:(NSError *__autoreleasing *)error {
5959
NSParameterAssert(privateKeyURL != nil);
6060
NSString *publicKeyPath = publicKeyURL.filePathURL.path;
6161
NSString *privateKeyPath = privateKeyURL.filePathURL.path;
@@ -71,7 +71,7 @@ + (instancetype)credentialWithUserName:(NSString *)userName publicKeyURL:(NSURL
7171
return [[self alloc] initWithGitCred:cred];
7272
}
7373

74-
+ (instancetype)credentialWithUserName:(NSString *)userName publicKeyString:(NSString *)publicKeyString privateKeyString:(NSString *)privateKeyString passphrase:(NSString *)passphrase error:(NSError **)error {
74+
+ (instancetype)credentialWithUserName:(NSString *)userName publicKeyString:(NSString *)publicKeyString privateKeyString:(NSString *)privateKeyString passphrase:(NSString *)passphrase error:(NSError *__autoreleasing *)error {
7575
NSParameterAssert(privateKeyString != nil);
7676

7777
git_cred *cred;

0 commit comments

Comments
 (0)