From 00bfbfb0db1fcf863e34d946e324ebc5cdb8d1ea Mon Sep 17 00:00:00 2001 From: Terin Stock Date: Sun, 24 Apr 2022 18:59:56 -0700 Subject: cmd/version: include fork and sqlite versions To add in identification and debuggability, this patch modifies the version of git to add the "tgif" designation to the version string as well as including the SQLite header and library versions. --- GIT-VERSION-GEN | 2 +- help.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index fdcebd2c58..4a99958b45 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -26,7 +26,7 @@ else VN="$DEF_VER" fi -VN=$(expr "$VN" : v*'\(.*\)') +VN=$(expr "$VN" : v*'\(.*\)')"-tgif" if test -r $GVF then diff --git a/help.c b/help.c index 41c41c2aa1..45a10fedb3 100644 --- a/help.c +++ b/help.c @@ -14,6 +14,10 @@ #include "prompt.h" #include "fsmonitor-ipc.h" +#if defined(USE_SQLITE) +#include +#endif + struct category_description { uint32_t category; const char *desc; @@ -718,6 +722,11 @@ void get_version_info(struct strbuf *buf, int show_build_options) if (fsmonitor_ipc__is_supported()) strbuf_addstr(buf, "feature: fsmonitor--daemon\n"); + +#if defined(USE_SQLITE) + strbuf_addf(buf, "sqlite-headers: %s\n", SQLITE_VERSION); + strbuf_addf(buf, "sqlite-library: %s\n", sqlite3_libversion()); +#endif } } -- cgit 1.4.1