remote: remove fetch parameter from create_anonymous

An anonymous remote is not configured and cannot therefore have
configured refspecs. Remove the parameter which adds this from the
constructor.
This commit is contained in:
Carlos Martín Nieto
2015-05-28 15:32:20 +02:00
parent 70f7484d2a
commit ae5b93629c
7 changed files with 17 additions and 30 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ int fetch(git_repository *repo, int argc, char **argv)
// Figure out whether it's a named remote or a URL
printf("Fetching %s for repo %p\n", argv[1], repo);
if (git_remote_lookup(&remote, repo, argv[1]) < 0) {
if (git_remote_create_anonymous(&remote, repo, argv[1], NULL) < 0)
if (git_remote_create_anonymous(&remote, repo, argv[1]) < 0)
return -1;
}
+1 -1
View File
@@ -15,7 +15,7 @@ static int use_remote(git_repository *repo, char *name)
// Find the remote by name
error = git_remote_lookup(&remote, repo, name);
if (error < 0) {
error = git_remote_create_anonymous(&remote, repo, name, NULL);
error = git_remote_create_anonymous(&remote, repo, name);
if (error < 0)
goto cleanup;
}