summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9963e02)
raw | patch | inline | side by side (parent: 9963e02)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 May 2011 19:23:44 +0000 (12:23 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 May 2011 20:08:10 +0000 (13:08 -0700) |
This function was introduced in 5b16360 (pretty: Initialize notes if %N is
used, 2010-04-13) to check what kind of information the "log --format=..."
user format string wants. The function can be passed a NULL instead of a
format string to ask it to check user_format variable kept by an earlier
call to save_user_format().
But it unconditionally checked user_format and not the string it was
given. The only caller introduced by the change passes NULL, which
kept the bug unnoticed, until a new GCC noticed that there is an
assignment to fmt that is never used.
Noticed-by: Chris Wilson's compiler
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Jeff King <peff@peff.net>
used, 2010-04-13) to check what kind of information the "log --format=..."
user format string wants. The function can be passed a NULL instead of a
format string to ask it to check user_format variable kept by an earlier
call to save_user_format().
But it unconditionally checked user_format and not the string it was
given. The only caller introduced by the change passes NULL, which
kept the bug unnoticed, until a new GCC noticed that there is an
assignment to fmt that is never used.
Noticed-by: Chris Wilson's compiler
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Jeff King <peff@peff.net>
pretty.c | patch | blob | history |
diff --git a/pretty.c b/pretty.c
index 13618d82644b72adc6068add826daa72dfe64f38..7d23c1f8481af3cfd73c76c76fb2e13a2a7e4a9c 100644 (file)
--- a/pretty.c
+++ b/pretty.c
return;
fmt = user_format;
}
- strbuf_expand(&dummy, user_format, userformat_want_item, w);
+ strbuf_expand(&dummy, fmt, userformat_want_item, w);
strbuf_release(&dummy);
}