summaryrefslogtreecommitdiff
path: root/version.c
blob: f98d5a654d4a17a9d85157b33f161afe6951a6e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "git-compat-util.h"
#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;
}