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.