Skip to content

Commit

Permalink
More compact code, no need for local vars.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaanus committed Dec 29, 2014
1 parent 3dc7a62 commit fcae826
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ObjectiveGit/GTRepository.m
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ + (id)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL opt

NSURL *serverCertificateURL = options[GTRepositoryCloneOptionsServerCertificateURL];
if (serverCertificateURL) {
const char *file = serverCertificateURL.fileSystemRepresentation;
const char *path = NULL;
int gitError = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, file, path);
int gitError = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, serverCertificateURL.fileSystemRepresentation, NULL);
if (gitError < GIT_OK) {
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to configure the server certificate at %@", serverCertificateURL];
return nil;
Expand Down

0 comments on commit fcae826

Please sign in to comment.