From: Johannes Sixt <j.sixt@viscovery.net>
To: Jeff King <peff@peff.net>
Cc: Mike Frysinger <vapier.adi@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: infinite loop in git-send-email with alias files
Date: Thu, 23 Jul 2009 14:30:55 +0200 [thread overview]
Message-ID: <4A6857FF.5070401@viscovery.net> (raw)
In-Reply-To: <20090723110928.GC4247@coredump.intra.peff.net>
Jeff King schrieb:
> +my %EXPANDED_ALIASES;
> +sub expand_one_alias {
> + my $alias = shift;
> + if ($EXPANDED_ALIASES{$alias}) {
> + die "fatal: alias '$alias' expands to itself\n";
> + }
> + local $EXPANDED_ALIASES{$alias} = 1;
> + return $aliases{$alias} ? expand_aliases(@{$aliases{$alias}}) : $alias;
What does 'local' make local here? Only the assignment of the slot
$EXPANDED_ALIASES{$alias}? Or the whole %EXPANDED_ALIASES? If the latter,
does this copy the existing %EXPANDED_ALIASES before the assignment is
made; otherwise, how can this work if only ever a single slot of
%EXPANDED_ALIASES is filled in?
(Disclaimer: I'm not a perl expert, obviously, and I didn't test your patch.)
-- Hannes
next prev parent reply other threads:[~2009-07-23 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 1:10 infinite loop in git-send-email with alias files Mike Frysinger
2009-07-23 11:09 ` Jeff King
2009-07-23 12:30 ` Johannes Sixt [this message]
2009-07-23 13:54 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A6857FF.5070401@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=vapier.adi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).