Skip to content

Commit ed58afe

Browse files
committed
Merge pull request #410 from libgit2/update-libgit2
Update libgit2
2 parents db3a254 + c0a7417 commit ed58afe

File tree

6 files changed

+3
-22
lines changed

6 files changed

+3
-22
lines changed

Classes/GTBranch.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ - (BOOL)calculateAhead:(size_t *)ahead behind:(size_t *)behind relativeTo:(GTBra
215215
return YES;
216216
}
217217

218-
int errorCode = git_graph_ahead_behind(ahead, behind, self.repository.git_repository, branch.reference.git_oid, self.reference.git_oid);
218+
int errorCode = git_graph_ahead_behind(ahead, behind, self.repository.git_repository, self.reference.git_oid, branch.reference.git_oid);
219219
if (errorCode != GIT_OK && error != NULL) {
220220
*error = [NSError git_errorFor:errorCode description:@"Failed to calculate ahead/behind count of %@ relative to %@", self, branch];
221221
return NO;

Classes/GTRemote.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ typedef enum {
6464
/// Tests if a URL is supported (e.g. it's a supported URL scheme)
6565
+ (BOOL)isSupportedURLString:(NSString *)URLString;
6666

67-
/// Tests if a URL is valid (e.g. it actually makes sense as a URL)
68-
+ (BOOL)isValidURLString:(NSString *)URLString;
69-
7067
/// Tests if a name is valid
7168
+ (BOOL)isValidRemoteName:(NSString *)name;
7269

Classes/GTRemote.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ - (NSUInteger)hash {
9090

9191
#pragma mark API
9292

93-
+ (BOOL)isValidURLString:(NSString *)URLString {
94-
NSParameterAssert(URLString != nil);
95-
96-
return git_remote_valid_url(URLString.UTF8String) == GIT_OK;
97-
}
98-
9993
+ (BOOL)isSupportedURLString:(NSString *)URLString {
10094
NSParameterAssert(URLString != nil);
10195

Classes/GTRepository.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ typedef NS_OPTIONS(NSInteger, GTCheckoutNotifyFlags) {
8181

8282
/// Transport flags sent as options to +cloneFromURL... method
8383
typedef NS_OPTIONS(NSInteger, GTTransportFlags) {
84-
GTTransportFlagsNone = GIT_TRANSPORTFLAGS_NONE,
85-
// If you pass this flag and the connection is secured with SSL/TLS,
86-
// the authenticity of the server certificate will not be verified.
87-
GTTransportFlagsNoCheckCert = GIT_TRANSPORTFLAGS_NO_CHECK_CERT,
84+
GTTransportFlagsNone = GIT_TRANSPORTFLAGS_NONE
8885
};
8986

9087
/// An `NSNumber` wrapped `GTTransportFlags`, documented above.

Classes/GTRepository.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,11 @@ static int remoteCreate(git_remote **remote, git_repository *repo, const char *n
196196
if ((error = git_remote_create(remote, repo, name, url)) < 0)
197197
return error;
198198

199-
if (pld->ignoreCertErrors)
200-
git_remote_check_cert(*remote, !pld->ignoreCertErrors);
201-
202199
return git_remote_set_callbacks(*remote, callbacks);
203200
}
204201

205202
struct GTRemoteCreatePayload {
206203
git_remote_callbacks remoteCallbacks;
207-
BOOL ignoreCertErrors;
208204
};
209205

210206
+ (id)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL options:(NSDictionary *)options error:(NSError **)error transferProgressBlock:(void (^)(const git_transfer_progress *))transferProgressBlock checkoutProgressBlock:(void (^)(NSString *path, NSUInteger completedSteps, NSUInteger totalSteps))checkoutProgressBlock {
@@ -240,12 +236,9 @@ + (id)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL opt
240236

241237
cloneOptions.remote_callbacks.transfer_progress = transferProgressCallback;
242238
cloneOptions.remote_callbacks.payload = &payload;
243-
244-
NSNumber *transportFlags = options[GTRepositoryCloneOptionsTransportFlags];
245239

246240
struct GTRemoteCreatePayload remoteCreatePayload;
247241
remoteCreatePayload.remoteCallbacks = cloneOptions.remote_callbacks;
248-
remoteCreatePayload.ignoreCertErrors = (transportFlags == nil ? 0 : 1);
249242

250243
cloneOptions.remote_cb = remoteCreate;
251244
cloneOptions.remote_cb_payload = &remoteCreatePayload;

External/libgit2

Submodule libgit2 updated 76 files

0 commit comments

Comments
 (0)