Thread (198 messages) 198 messages, 6 authors, 2025-06-20
STALE403d
Revisions (11)
  1. v6 [diff vs current]
  2. v7 current
  3. v9 [diff vs current]
  4. v10 [diff vs current]
  5. v12 [diff vs current]
  6. v14 [diff vs current]
  7. v15 [diff vs current]
  8. v16 [diff vs current]
  9. v17 [diff vs current]
  10. v18 [diff vs current]
  11. v19 [diff vs current]

[PATCH v7 6/9] imap-send: enable user to choose between libcurl and openssl using the config

From: Aditya Garg <hidden>
Date: 2025-05-28 17:18:36
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Currently, imap-send allows the user to choose between libcurl and
openssl in case Git is compiled with both libraries only using the
command line, and no option to set a default using the config is
available. Add support for the same.

Signed-off-by: Aditya Garg <redacted>
---
 Documentation/config/imap.adoc   | 7 +++++++
 Documentation/git-imap-send.adoc | 4 ++--
 imap-send.c                      | 2 ++
 3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Documentation/config/imap.adoc b/Documentation/config/imap.adoc
index 829d9e0bac..608c0be7ab 100644
--- a/Documentation/config/imap.adoc
+++ b/Documentation/config/imap.adoc
@@ -25,6 +25,13 @@ imap.port::
 	Defaults to 143 for imap:// hosts and 993 for imaps:// hosts.
 	Ignored when imap.tunnel is set.
 
+imap.usecurl::
+	A boolean to choose whether to use libcurl or not to communicate
+	with the IMAP server.
+	Ignored if Git was built without `USE_CURL_FOR_IMAP_SEND` option
+	or with `NO_OPENSSL` option set.
+	`--[no]-curl` argument will override this option.
+
 imap.sslverify::
 	A boolean to enable/disable verification of the server certificate
 	used by the SSL/TLS connection. Default is `true`. Ignored when
diff --git a/Documentation/git-imap-send.adoc b/Documentation/git-imap-send.adoc
index a35f278baf..cbbe534ec2 100644
--- a/Documentation/git-imap-send.adoc
+++ b/Documentation/git-imap-send.adoc
@@ -46,12 +46,12 @@ OPTIONS
 
 --curl::
 	Use libcurl to communicate with the IMAP server, unless tunneling
-	into it.  Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
+	into it.  Ignored if Git was built without the `USE_CURL_FOR_IMAP_SEND`
 	option set.
 
 --no-curl::
 	Talk to the IMAP server using git's own IMAP routines instead of
-	using libcurl.  Ignored if Git was built with the NO_OPENSSL option
+	using libcurl.  Ignored if Git was built with the `NO_OPENSSL` option
 	set.
 
 
diff --git a/imap-send.c b/imap-send.c
index 337f1049ca..b08ec0e1d5 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1559,6 +1559,8 @@ static int git_imap_config(const char *var, const char *val,
 		return git_config_string(&cfg->auth_method, var, val);
 	} else if (!strcmp("imap.port", var)) {
 		cfg->port = git_config_int(var, val, ctx->kvi);
+	} else if (!strcmp("imap.usecurl", var)) {
+		use_curl = git_config_bool(var, val);
 	} else if (!strcmp("imap.host", var)) {
 		if (!val) {
 			return config_error_nonbool(var);
-- 
2.49.0.638.g5db5b64a3b.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help