]> git.ipfire.org Git - thirdparty/git.git/blame - version.c
http: get default user-agent from git_user_agent
[thirdparty/git.git] / version.c
CommitLineData
816fb46b
JK
1#include "git-compat-util.h"
2#include "version.h"
3
4const char git_version_string[] = GIT_VERSION;
42dcbb73
JK
5
6const char *git_user_agent(void)
7{
8 static const char *agent = NULL;
9
10 if (!agent) {
11 agent = getenv("GIT_USER_AGENT");
12 if (!agent)
13 agent = GIT_USER_AGENT;
14 }
15
16 return agent;
17}