Commit f393d4e8d725b3e45a4b438a6f3ab7be589b2806

Ben Straub 2013-02-06T13:07:56

Clone: fetch all tags

diff --git a/include/git2/clone.h b/include/git2/clone.h
index b546768..e7205d7 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 333bf21..4b72b83 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(