public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [RFC] send-email: UTF-8 encoding in subject line
@ 2026-02-20 14:50 Shreyansh Paliwal
  2026-02-21  2:28 ` Ben Knoble
  2026-02-24 14:33 ` [PATCH] send-email: validate charset name in 8bit encoding prompt Shreyansh Paliwal
  0 siblings, 2 replies; 29+ messages in thread
From: Shreyansh Paliwal @ 2026-02-20 14:50 UTC (permalink / raw)
  To: git

Hi,

While using git send-email I ran into some confusion around the prompt that
appears when any 8-bit (non-ASCII) content is detected.

When prompted with,

  Which 8bit encoding should I declare [UTF-8]? y
  Are you sure you want to use <y> [y/N]? y

I initially assumed this was a yes/no style confirmation and answered "y",
and ignored the 'which' part (this was due to my oversight). This resulted
in the charset being set to "y", which later produced a subject line like,

  =?y?q?...?=

Mail clients like Gmail still displayed the message correctly, but the
mailing list archive showed the raw encoded form[1].

Afterwards, I realized the prompt expects a charset name (e.g., "UTF-8")
rather than a yes/no answer, and pressing enter would have selected the
default (which is UTF-8).

I had also encountered this earlier when the non-ASCII character was in the
message body rather than the subject, in that case the result appeared to
work fine even with the mistaken input, which made the issue less obvious
to me at first.

This made me wonder whether the current UX around the prompts or input
validation could be improved in any way to reduce the chance of accidental
input being interpreted as a charset name.

Best,
Shreyansh

[1]- https://lore.kernel.org/git/20260219181154.66814-1-shreyanshpaliwalcmsmn@gmail.com/

^ permalink raw reply	[flat|nested] 29+ messages in thread
* =?y?q?=5BGSOC=5D=20Discuss=3A=20Refactoring=20in=20order=20to=20reduce=20Git=E2=80=99s=20global=20state?=
@ 2026-02-19 18:02 Shreyansh Paliwal
  2026-02-19 18:17 ` [GSOC] Discuss: Refactoring in order to reduce global state Shreyansh Paliwal
  2026-02-23  8:26 ` Shreyansh Paliwal
  0 siblings, 2 replies; 29+ messages in thread
From: Shreyansh Paliwal @ 2026-02-19 18:02 UTC (permalink / raw)
  To: git
  Cc: gitster, christian.couder, karthik.188, jltobler, ayu.chandekar,
	siddharthasthana31, lucasseikioshiro

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2474 bytes --]

Hi everyone,

I have been around Git for some time and am interested in the “Refactoring
in order to reduce Git’s global state” project for GSoC 2026.

So far I have built Git from source, completed a microproject, and explored
some related areas in worktree and wt-status. I have also gone through the
blog posts by Ayush and Bello Olamide, which were very helpful in getting
to know about the ongoing/previous related to this. From what I gathered,

- In Outreachy, recent work has focused on moving core.attributesfile and
  core.sparseCheckout into local structs and also to handle the issue of
  lazy loading, but it is still a work in progress.

- In last year’s GSoC work, the focus included removing uses of
  the_repository and other globals across areas such as
  preload-index:(core_preload_index), builtin/prune:
  (repository_format_precious_objects), builtin/fmt-merge-msg:
  (merge_log_config).

Though I still have a few questions regarding the project for better clarity,

- Should the primary focus be on core library code rather than builtin?
  (ref. [1])

- Is it preferable to approach the project file-wise (eg. cleanup of one
  file making it completely free of the_repository) or variable-wise (eg.
  identify one global state from environment.c and eliminate across the
  codebase)?

- Are there any globals which are best not to be removed currently?

For example, in editor.c there are mainly two globals,

- editor_program, which appears to be only used within the file and is not
  dependant on repository. So would it be preferable to remove it from
  environment.c and localize it within editor.c, move it into struct
  repository_settings / repo_config_values, or keep it as is?

- the_repository, there is only one instance in the function
  git_sequence_editor() which is used in editor.c which can be modified to
  pass struct repository down the callers but is also used in
  builtin/var.c, where a local repository instance is not available. In
  that case, would it be feasible to pass the_repository or is there any
  other way?

I have also surveyed files that use #define USE_THE_REPOSITORY_VARIABLE to
roughly analyse the usage of globals, and I could make that much of the
library code is still dependant on the_repository, so could that be taken
on priority to reduce the usage of the_repository throughout the codebase.

Thanks,
Shreyansh

[1]- https://lore.kernel.org/git/7b5dd0c4-0ca0-458e-89db-621a70dac9ae@gmail.com/

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2026-03-03 19:07 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 14:50 [RFC] send-email: UTF-8 encoding in subject line Shreyansh Paliwal
2026-02-21  2:28 ` Ben Knoble
2026-02-21 13:38   ` Shreyansh Paliwal
2026-02-21 17:30     ` Junio C Hamano
2026-02-22 14:03       ` Shreyansh Paliwal
2026-02-22 14:53         ` Philip Oakley
2026-02-22 15:00         ` D. Ben Knoble
2026-02-22 15:52           ` Shreyansh Paliwal
2026-02-23 21:38             ` Ben Knoble
2026-02-24  7:55               ` [GSOC] Discuss: Refactoring in order to reduce global state Shreyansh Paliwal
2026-02-22 14:53       ` [RFC] send-email: UTF-8 encoding in subject line D. Ben Knoble
2026-02-24 14:33 ` [PATCH] send-email: validate charset name in 8bit encoding prompt Shreyansh Paliwal
2026-02-24 21:11   ` Junio C Hamano
2026-02-24 21:37   ` [PATCH v2] " Shreyansh Paliwal
2026-02-24 22:06     ` Junio C Hamano
2026-02-24 22:20       ` Shreyansh Paliwal
2026-02-25 16:37     ` D. Ben Knoble
2026-02-26 17:32       ` Shreyansh Paliwal
2026-02-26 16:16   ` [PATCH v3] " Shreyansh Paliwal
2026-02-26 18:45     ` Junio C Hamano
2026-02-26 19:06       ` Junio C Hamano
2026-02-28  8:41         ` Shreyansh Paliwal
2026-02-28  8:36       ` Shreyansh Paliwal
2026-02-28 11:20   ` [PATCH v4] " Shreyansh Paliwal
2026-02-28 21:16     ` D. Ben Knoble
2026-03-02 16:10     ` Junio C Hamano
2026-03-03 19:06       ` Shreyansh Paliwal
  -- strict thread matches above, loose matches on Subject: below --
2026-02-19 18:02 =?y?q?=5BGSOC=5D=20Discuss=3A=20Refactoring=20in=20order=20to=20reduce=20Git=E2=80=99s=20global=20state?= Shreyansh Paliwal
2026-02-19 18:17 ` [GSOC] Discuss: Refactoring in order to reduce global state Shreyansh Paliwal
2026-02-23  8:26 ` Shreyansh Paliwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox