git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-email: validate charset name in 8bit encoding prompt

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 24, 2026, 21:11 UTC
Message-ID
<xmqqbjhdg847.fsf@gitster.g>
In-Reply-To
<20260224143624.23678-1-shreyanshpaliwalcmsmn@gmail.com>
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> writes:
Show 7 quoted lines
> +			if ($warn_invalid) {
> +				if (find_encoding($resp))
> +					return $resp;
> +				else
> +					printf STDERR __("warning: '%s' does not appear to be a valid charset name.\n"), $resp;
> +			} else
> +				return $resp;
This is not C but Perl.
 git-send-email.perl | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git i/git-send-email.perl w/git-send-email.perl
index dc4e5418d3..15387ac377 100755
--- i/git-send-email.perl
+++ w/git-send-email.perl
@@ -1008,12 +1008,14 @@ sub ask {
 		}
 		if (!defined $valid_re or $resp =~ /$valid_re/) {
 			if ($warn_invalid) {
-				if (find_encoding($resp))
+				if (find_encoding($resp)) {
 					return $resp;
-				else
+				} else {
 					printf STDERR __("warning: '%s' does not appear to be a valid charset name.\n"), $resp;
-			} else
+				}
+			} else {
 				return $resp;
+			}
 		}
 		if ($confirm_only) {
 			my $yesno = $term->readline(
Previous: Shreyansh PaliwalNext: Shreyansh Paliwal
Message 13 of 27 in “[RFC] send-email: UTF-8 encoding in subject line”
  1. Shreyansh PaliwalFeb 20, 2026
  2. Ben KnobleFeb 21, 2026
  3. Shreyansh PaliwalFeb 21, 2026
  4. Junio C HamanoFeb 21, 2026
  5. Shreyansh PaliwalFeb 22, 2026
  6. D. Ben KnobleFeb 22, 2026
  7. Shreyansh PaliwalFeb 22, 2026
  8. Ben KnobleFeb 23, 2026
  9. Shreyansh PaliwalFeb 24, 2026
  10. Philip OakleyFeb 22, 2026
  11. D. Ben KnobleFeb 22, 2026
  12. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 24, 2026
  13. Junio C HamanoFeb 24, 2026
  14. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 24, 2026
  15. Junio C HamanoFeb 24, 2026
  16. Shreyansh PaliwalFeb 24, 2026
  17. D. Ben KnobleFeb 25, 2026
  18. Shreyansh PaliwalFeb 26, 2026
  19. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 26, 2026
  20. Junio C HamanoFeb 26, 2026
  21. Junio C HamanoFeb 26, 2026
  22. Shreyansh PaliwalFeb 28, 2026
  23. Shreyansh PaliwalFeb 28, 2026
  24. send-email: validate charset name in 8bit encoding promptShreyansh Paliwal, Feb 28, 2026
  25. D. Ben KnobleFeb 28, 2026
  26. Junio C HamanoMar 2, 2026
  27. Shreyansh PaliwalMar 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.