diff options
| author | Vicent Martà <vicent@github.com> | 2013-05-31 03:08:48 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-05-31 03:08:48 -0700 |
| commit | af2c72d228eab2d380d47cb7a5c19ba562340429 (patch) | |
| tree | a055dc16c2b92e0b6aa01297d5ff1f6ca0384683 /src | |
| parent | 9d6d809b7fa7b3b3a6507496908166740527fc84 (diff) | |
| parent | df50512aebb77f9fab3a930e367fba3777d6ee81 (diff) | |
| download | libgit2-af2c72d228eab2d380d47cb7a5c19ba562340429.tar.gz | |
Merge pull request #1623 from yorah/fix/tag_auto
remote: make default tag retrieving behaviour consistent
Diffstat (limited to 'src')
| -rw-r--r-- | src/clone.c | 1 | ||||
| -rw-r--r-- | src/remote.c | 12 |
2 files changed, 3 insertions, 10 deletions
diff --git a/src/clone.c b/src/clone.c index 7ebdb5765..4f763268b 100644 --- a/src/clone.c +++ b/src/clone.c @@ -422,7 +422,6 @@ static void normalize_options(git_clone_options *dst, const git_clone_options *s /* Provide defaults for null pointers */ if (!dst->remote_name) dst->remote_name = "origin"; - if (!dst->remote_autotag) dst->remote_autotag = GIT_REMOTE_DOWNLOAD_TAGS_AUTO; } int git_clone( diff --git a/src/remote.c b/src/remote.c index 7a64622a5..4c1b39818 100644 --- a/src/remote.c +++ b/src/remote.c @@ -48,11 +48,7 @@ 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; + /* The 0 value is the default (auto), let's see if we need to change it */ if (git_buf_printf(&buf, "remote.%s.tagopt", remote->name) < 0) return -1; @@ -117,10 +113,9 @@ 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; - } *out = remote; git_buf_free(&fetchbuf); @@ -246,7 +241,6 @@ int git_remote_load(git_remote **out, git_repository *repo, const char *name) git_config *config; struct refspec_cb_data data; - assert(out && repo && name); if ((error = ensure_remote_name_is_valid(name)) < 0) |
