Skip to content

Commit fcae826

Browse files
committed
More compact code, no need for local vars.
1 parent 3dc7a62 commit fcae826

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ObjectiveGit/GTRepository.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,7 @@ + (id)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)workdirURL opt
269269

270270
NSURL *serverCertificateURL = options[GTRepositoryCloneOptionsServerCertificateURL];
271271
if (serverCertificateURL) {
272-
const char *file = serverCertificateURL.fileSystemRepresentation;
273-
const char *path = NULL;
274-
int gitError = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, file, path);
272+
int gitError = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, serverCertificateURL.fileSystemRepresentation, NULL);
275273
if (gitError < GIT_OK) {
276274
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to configure the server certificate at %@", serverCertificateURL];
277275
return nil;

0 commit comments

Comments
 (0)