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

Re: [PATCH] send-email: Don't leak To: headers between patches

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 4, 2010, 08:00 UTC
Message-ID
<7vpqvq8k1i.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTinnd-ZTqfKvEaDQ6o-gR2oAmvEChSpDps5T0Xsu@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> That's a much better solution IMO than the C-like usage of two
> variables. Lexical shadowing is exactly for this sort of thing.

Lexical scoping, yes, shadowing a variable of the same name in the outer scope, no. The latter is a readability nightmare in the longer term.

IOW, I would prefer to keep @initial_to and @initial_cc as "these apply globally to the whole command invocation", copied to separate @to and @cc that are primed by the former and tweaked per message.

Previous: Ævar Arnfjörð BjarmasonNext: Joe Perches
Message 6 of 9 in “send-email: Clear To: field for every mail”
  1. send-email: Clear To: field for every mailViresh KUMAR, Oct 4, 2010
  2. send-email: Don't leak To: headers between patchesStephen Boyd, Oct 4, 2010
  3. Junio C HamanoOct 4, 2010
  4. Ævar Arnfjörð BjarmasonOct 4, 2010
  5. Ævar Arnfjörð BjarmasonOct 4, 2010
  6. Junio C HamanoOct 4, 2010
  7. Joe PerchesOct 4, 2010
  8. Junio C HamanoOct 4, 2010
  9. viresh kumarOct 4, 2010

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.