From: Will Palmer <wmpalmer@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, peff@peff.net
Subject: Re: [PATCH] pretty: initialize new cmt_fmt_map to 0
Date: Sat, 08 May 2010 23:04:54 +0100 [thread overview]
Message-ID: <1273356294.12996.5.camel@walleee> (raw)
In-Reply-To: <20100508210739.GA6486@progeny.tock>
On Sat, 2010-05-08 at 16:07 -0500, Jonathan Nieder wrote:
> Without this change, is_alias is likely to happen to be nonzero,
> resulting in "fatal: invalid --pretty format" when the fake alias
> cannot be resolved.
>
> Use memset instead of initializing the members one by one to make it
> easier to expand the struct in the future if needed.
>
> t4205 (log --pretty) does not pass for me without this fix.
>
> Cc: Will Palmer <wmpalmer@gmail.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> Sorry I missed this before. Sane?
>
> Jonathan
Ah, looks right. I think previous versions of my patch were building in
a local variable (which /was/ initialized), then copied the whole thing
into the newly-allocated space. When this was changed to building
in-place, the initialization was lost. Good catch, thanks.
Not sure if Signed-off-by or Reviewed-by is the appropriate tag to
mention here, but one of those, I assume.
--
-- Will
next prev parent reply other threads:[~2010-05-08 22:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-02 11:00 [PATCH v4 0/3] pretty: format aliases Will Palmer
2010-05-02 11:00 ` [PATCH v4 1/3] pretty: make it easier to add new formats Will Palmer
2010-05-02 11:22 ` Jonathan Nieder
2010-05-02 11:00 ` [PATCH v4 2/3] pretty: add infrastructure to allow format aliases Will Palmer
2010-05-02 11:55 ` Jonathan Nieder
2010-05-02 11:00 ` [PATCH v4 3/3] pretty: add aliases for pretty formats Will Palmer
2010-05-02 12:30 ` Jonathan Nieder
2010-05-02 13:38 ` Will Palmer
2010-05-08 21:07 ` [PATCH] pretty: initialize new cmt_fmt_map to 0 Jonathan Nieder
2010-05-08 22:04 ` Will Palmer [this message]
2010-05-02 15:53 ` [PATCH v4 0/3] pretty: format aliases Junio C Hamano
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=1273356294.12996.5.camel@walleee \
--to=wmpalmer@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
/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).