From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <stefanbeller@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] rm: do not set a variable twice without intermediate reading.
Date: Tue, 23 Jul 2013 12:01:33 -0700 [thread overview]
Message-ID: <7vzjtd6qya.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51EECFBB.3050406@googlemail.com> (Stefan Beller's message of "Tue, 23 Jul 2013 20:47:23 +0200")
Stefan Beller <stefanbeller@googlemail.com> writes:
> On 07/23/2013 08:32 PM, Junio C Hamano wrote:
>> Interesting. This is ancient and dates back to 7612a1ef (git-rm:
>> honor -n flag., 2006-06-08).
> Originally it comes from d9b814cc97 (by Linus), which introduced:
> + seen = NULL;
> + if (pathspec) {
> + for (i = 0; pathspec[i] ; i++)
> + /* nothing */;
> + seen = xmalloc(i);
> + memset(seen, 0, i);
> + }
>
> Then in 7612a1efdb0c the second seen assignment was made unconditional.
That is why I blamed the bug to 7612a1ef. Before that, without pathspec,
directory traversal function were told not to report which ones were
seen and which ones were not by passing seen=NULL.
prev parent reply other threads:[~2013-07-23 19:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 9:19 [PATCH] rm: do not set a variable twice without intermediate reading Stefan Beller
2013-07-23 18:32 ` Junio C Hamano
2013-07-23 18:47 ` Stefan Beller
2013-07-23 19:01 ` Junio C Hamano [this message]
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=7vzjtd6qya.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=stefanbeller@googlemail.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).