diff options
Diffstat (limited to 'version.c')
-rw-r--r-- | version.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -2,3 +2,16 @@ #include "version.h" const char git_version_string[] = GIT_VERSION; + +const char *git_user_agent(void) +{ + static const char *agent = NULL; + + if (!agent) { + agent = getenv("GIT_USER_AGENT"); + if (!agent) + agent = GIT_USER_AGENT; + } + + return agent; +} |