mirror of
https://git.proxmox.com/git/libgit2
synced 2026-08-26 16:25:18 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user