From df50512aebb77f9fab3a930e367fba3777d6ee81 Mon Sep 17 00:00:00 2001 From: yorah Date: Thu, 30 May 2013 18:06:54 +0200 Subject: Proposal to handle default value (auto = 0) --- src/remote.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/remote.c') diff --git a/src/remote.c b/src/remote.c index 4fefe8001..4c1b39818 100644 --- a/src/remote.c +++ b/src/remote.c @@ -48,8 +48,7 @@ static int download_tags_value(git_remote *remote, git_config *cfg) git_buf buf = GIT_BUF_INIT; int error; - /* 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,9 +116,6 @@ static int create_internal(git_remote **out, git_repository *repo, const char *n 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); @@ -245,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) -- cgit v1.2.1