[PATCH v2 1/2] Teach git version --build-options about libcurl
- From
- Randall S. Becker <the.n.e.key@gmail.com>
- Date
- Jun 21, 2024, 18:09 UTC
- Message-ID
- <20240621180947.64419-2-randall.becker@nexbridge.ca>
- In-Reply-To
- <20240621180947.64419-1-randall.becker@nexbridge.ca>
This change uses the libcurl LIBCURL_VERSION #define text macro. No stringification is required for the variable's use. If the #define is not present, that version is not reported.
Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> --- help.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/help.c b/help.c index 1d057aa607..bf74e935b9 100644 --- a/help.c +++ b/help.c @@ -1,4 +1,5 @@ #include "git-compat-util.h" +#include "git-curl-compat.h" /* For LIBCURL_VERSION only */ #include "config.h" #include "builtin.h" #include "exec-cmd.h" @@ -757,6 +758,9 @@ 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 LIBCURL_VERSION + strbuf_addf(buf, "libcurl: %s\n", LIBCURL_VERSION); +#endif } }
-- 2.43.0