aboutsummaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-06-02 15:03:08 -0400
committerJunio C Hamano <gitster@pobox.com>2012-06-03 13:11:54 -0700
commit745c7c8e6252ba41430a1442e1fa8da2ec40e9c2 (patch)
treeb0dc93ef1c6e2da4f08a567adffee79cb4007852 /http.c
parent42dcbb738b47ab7e2b265ed981c9a4a7bda92f97 (diff)
downloadgit-745c7c8e6252ba41430a1442e1fa8da2ec40e9c2.tar.gz
git-745c7c8e6252ba41430a1442e1fa8da2ec40e9c2.tar.xz
http: get default user-agent from git_user_agent
This means we will respect the GIT_USER_AGENT build-time configuration and run-time environment variable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/http.c b/http.c
index 5cb87f16f..b61ac85d4 100644
--- a/http.c
+++ b/http.c
@@ -4,6 +4,7 @@
#include "run-command.h"
#include "url.h"
#include "credential.h"
+#include "version.h"
int active_requests;
int http_is_verbose;
@@ -299,7 +300,7 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result, CURLOPT_VERBOSE, 1);
curl_easy_setopt(result, CURLOPT_USERAGENT,
- user_agent ? user_agent : GIT_HTTP_USER_AGENT);
+ user_agent ? user_agent : git_user_agent());
if (curl_ftp_no_epsv)
curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);