libgit2/libgit2 — pull request #1524 by jamill (2013-05-01 02:20:51+00:00)
Title: By default do not set tagopt when cloning

Cloning with libgit2 using the default clone options results in "remote..tagopt" being set to --tags for the origin remote. This means that the default fetch behavior is to fetch tags only (fetch with the `refs/tags/:refs/tags/` refspec, instead of the default configured refspec). This leads to unexpected behavior when fetching from the command line and also differs from the default remote as configured by core git:

cloning from command line:

[remote "origin"]
url = https://github.com/libgit2/libgit2sharp.git
fetch = +refs/heads/*:refs/remotes/origin/*

cloning from libgit2 with default options:

[remote "origin"]
url = http://github.com/libgit2/libgit2.git
fetch = +refs/heads/*:refs/remotes/origin/*
tagopt = --tags

This change sets the default clone opts to auto, which results in tagopt not being set. We could also just not normalize this particular clone option, which I believe would achieve the same result.