version: add git_user_agent function

This is basically a fancy way of saying "git/$GIT_VERSION",
except that it is overridable at build-time and through the
environment. Which means that people who don't want to
advertise their git version (for privacy or security
reasons) can tweak it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2012-06-02 15:01:12 -04:00
committed by Junio C Hamano
parent 816fb46be6
commit 42dcbb738b
3 changed files with 26 additions and 0 deletions

View File

@@ -3,4 +3,6 @@
extern const char git_version_string[];
const char *git_user_agent(void);
#endif /* VERSION_H */