1
0
mirror of https://github.com/git/git.git synced 2024-11-15 17:13:16 +01:00
git/version.h
Johannes Schindelin ed32b788c0 version --build-options: report commit, too, if possible
In particular when local tags are used (or tags that are pushed to some
fork) to build Git, it is very hard to figure out from which particular
revision a particular Git executable was built. It gets worse when those
tags are deleted, or even updated.

Let's just report an exact, unabbreviated commit name in our build
options.

We need to be careful, though, to report when the current commit cannot
be determined, e.g. when building from a tarball without any associated
Git repository. This could be the case also when extracting Git's source
code into an unrelated Git worktree.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-14 22:53:04 -08:00

11 lines
230 B
C

#ifndef VERSION_H
#define VERSION_H
extern const char git_version_string[];
extern const char git_built_from_commit_string[];
const char *git_user_agent(void);
const char *git_user_agent_sanitized(void);
#endif /* VERSION_H */