X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=remote.c;h=e51cd22d6bcbd29bd47392434d37fb50d7b97588;hb=5bfd53629e93113a17fe7d6a7a24554dc3c17cdb;hp=26ce56046dd14fec4ae59c7e7df3c2072178c51d;hpb=318d4013461dbd6fc6bbd05983fc4a9fd5465769;p=git.git diff --git a/remote.c b/remote.c index 26ce56046..e51cd22d6 100644 --- a/remote.c +++ b/remote.c @@ -443,6 +443,8 @@ static int handle_config(const char *key, const char *value, void *cb) } else if (!strcmp(subkey, ".tagopt")) { if (!strcmp(value, "--no-tags")) remote->fetch_tags = -1; + else if (!strcmp(value, "--tags")) + remote->fetch_tags = 2; } else if (!strcmp(subkey, ".proxy")) { return git_config_string((const char **)&remote->http_proxy, key, value); @@ -657,10 +659,9 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp int valid_fetch_refspec(const char *fetch_refspec_str) { - const char *fetch_refspec[] = { fetch_refspec_str }; struct refspec *refspec; - refspec = parse_refspec_internal(1, fetch_refspec, 1, 1); + refspec = parse_refspec_internal(1, &fetch_refspec_str, 1, 1); free_refspecs(refspec, 1); return !!refspec; }