summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-05-08 16:07:39 -0500
committerJunio C Hamano <gitster@pobox.com>2010-05-08 16:09:31 -0700
commit95a2618f60a61fae8097695255419f257f74dff9 (patch)
tree2d2a906f6de96aa754d62610aed07b045a05326f
parent8028184eecf1051e4b39b308a3ad909eed1371c4 (diff)
downloadgit-95a2618f60a61fae8097695255419f257f74dff9.tar.gz
pretty: initialize new cmt_fmt_map to 0
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--pretty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pretty.c b/pretty.c
index aaf80207c9..4784f676fa 100644
--- a/pretty.c
+++ b/pretty.c
@@ -59,6 +59,7 @@ static int git_pretty_formats_config(const char *var, const char *value, void *c
ALLOC_GROW(commit_formats, commit_formats_len+1,
commit_formats_alloc);
commit_format = &commit_formats[commit_formats_len];
+ memset(commit_format, 0, sizeof(*commit_format));
commit_formats_len++;
}