set useragent

This commit is contained in:
risk danger olson 2016-12-20 15:46:45 -07:00
parent 4f9af9e708
commit dda79b4c5a
2 changed files with 7 additions and 0 deletions

@ -4,6 +4,8 @@ import (
"fmt"
"runtime"
"strings"
"github.com/git-lfs/git-lfs/lfsapi"
)
var (
@ -28,4 +30,5 @@ func init() {
gitCommit,
)
lfsapi.UserAgent = VersionDesc
}

@ -13,7 +13,11 @@ import (
"github.com/rubyist/tracerx"
)
var UserAgent = "git-lfs"
func (c *Client) Do(req *http.Request) (*http.Response, error) {
req.Header.Set("User-Agent", UserAgent)
res, err := c.doWithRedirects(c.httpClient(req.Host), req, nil)
if err != nil {
return res, err