Subject: Re: [PATCH] pretty: initialize new cmt_fmt_map to 0

From: Will Palmer <[email-masked]>
Date: Sat, 08 May 2010 23:04:54 +0100

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 <[email-masked]>
> Signed-off-by: Jonathan Nieder <[email-masked]>
> ---
> 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