Thread (2 messages) 2 messages, 1 author, 2024-06-21
DORMANTno replies
Revisions (2)
  1. v0 current
  2. v2 [diff vs current]

[PATCH v0 1/1] Teach git version --build-options about zlib+libcurl

From: Randall S. Becker <hidden>
Date: 2024-06-21 15:46:28
Subsystem: the rest · Maintainer: Linus Torvalds

This change uses the zlib supplied ZLIB_VERSION #define supplied text
macro and the libcurl LIBCURL_VERSION #define text macro. No
stringification is required for either variable's use. If either of
the #define is not present, that version is not reported.

Signed-off-by: Randall S. Becker <redacted>
---
 help.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/help.c b/help.c
index 1d057aa607..f378750af4 100644
--- a/help.c
+++ b/help.c
@@ -1,4 +1,5 @@
 #include "git-compat-util.h"
+#include "git-curl-compat.h"
 #include "config.h"
 #include "builtin.h"
 #include "exec-cmd.h"
@@ -757,6 +758,12 @@ 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
+#if defined ZLIB_VERSION
+		strbuf_addf(buf, "zlib: %s\n", ZLIB_VERSION);
+#endif
 	}
 }
 
-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help