summaryrefslogtreecommitdiff
path: root/src/Command.cc
diff options
context:
space:
mode:
authorRichard Kettlewell <rjk@greenend.org.uk>2019-02-04 20:19:36 +0000
committerRichard Kettlewell <rjk@greenend.org.uk>2019-02-04 20:19:36 +0000
commitbdd2ef931596b5d6991d7b118004fd61ad07550b (patch)
treef648771e10c9ddf1ff80c706ccb82d2eea49379b /src/Command.cc
parentda3626e324c8627d586b78200e2c6e69f80627b0 (diff)
Include git version information in --version
Diffstat (limited to 'src/Command.cc')
-rw-r--r--src/Command.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Command.cc b/src/Command.cc
index d2cc800..af673b6 100644
--- a/src/Command.cc
+++ b/src/Command.cc
@@ -125,7 +125,10 @@ const char *Command::helpString() {
}
void Command::version() {
- IO::out.writef("%s\n", VERSION);
+ IO::out.writef("%s", VERSION);
+ if(strlen(TAG) > 0)
+ IO::out.writef(" (git: %s)", TAG);
+ IO::out.writef("\n");
IO::out.close();
exit(0);
}