summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/git2/clone.h2
-rw-r--r--src/clone.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/clone.h b/include/git2/clone.h
index b54676874..e7205d744 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -56,7 +56,7 @@ GIT_BEGIN_DECL
* - `remote_callbacks` may be used to specify custom progress callbacks for
* the origin remote before the fetch is initiated.
* - `remote_autotag` may be used to specify the autotag setting before the
- * initial fetch.
+ * initial fetch. The default is GIT_REMOTE_DOWNLOAD_TAGS_ALL.
* - `checkout_branch` gives the name of the branch to checkout. NULL means
* use the remote's HEAD.
*/
diff --git a/src/clone.c b/src/clone.c
index 333bf2148..4b72b833c 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -417,6 +417,7 @@ 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_ALL;
}
int git_clone(