diff options
author | yorah <yoram.harmelin@gmail.com> | 2013-05-30 19:40:56 +0400 |
---|---|---|
committer | yorah <yoram.harmelin@gmail.com> | 2013-05-30 19:59:11 +0400 |
commit | 215af2ccb87ac22d94b7205ff97a050622de6897 (patch) | |
tree | 3e25087463609bd3872d8b794f493280534fd5fa /src/remote.c | |
parent | 0c01f93e8c89a16b3531e4fb32384fe90bf4c548 (diff) |
remote: make default tag retrieving behaviour consistent
Default for newly created remotes will be auto.
Default when loading existing remotes with no tag retrieving behaviour set, was already auto.
Diffstat (limited to 'src/remote.c')
-rw-r--r-- | src/remote.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/remote.c b/src/remote.c index 7a64622a5..4fefe8001 100644 --- a/src/remote.c +++ b/src/remote.c @@ -48,9 +48,6 @@ static int download_tags_value(git_remote *remote, git_config *cfg) git_buf buf = GIT_BUF_INIT; int error; - if (remote->download_tags != GIT_REMOTE_DOWNLOAD_TAGS_UNSET) - return 0; - /* This is the default, let's see if we need to change it */ remote->download_tags = GIT_REMOTE_DOWNLOAD_TAGS_AUTO; if (git_buf_printf(&buf, "remote.%s.tagopt", remote->name) < 0) @@ -117,10 +114,12 @@ static int create_internal(git_remote **out, git_repository *repo, const char *n goto on_error; } - /* A remote without a name doesn't download tags */ - if (!name) { + if (!name) + /* A remote without a name doesn't download tags */ remote->download_tags = GIT_REMOTE_DOWNLOAD_TAGS_NONE; - } + else + /* the default for a newly created remote is auto */ + remote->download_tags = GIT_REMOTE_DOWNLOAD_TAGS_AUTO; *out = remote; git_buf_free(&fetchbuf); |