checkout: don't rfc2047-encode oneline on detached HEAD
When calling pretty_print_commit, there is an implicit assumption that passing in a non-NULL "subject" variable for oneline or email formats means that the output is part of a subject and therefore "subject" to rfc2047 encoding. This is not the desired effect when reporting the movement of detached HEAD. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
May 2, 2008 at 10:05 UTC
278863180a280304d6b7f4ad6f11c1a810463507
1 file changed
+1
-1
builtin-checkout.c
+1
-1
@@ -142,7 +142,7 @@ static void describe_detached_head(char *msg, struct commit *commit)
142
struct strbuf sb;
143
strbuf_init(&sb, 0);
144
parse_commit(commit);
145
- pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, 0, "", "", 0, 0);
145
+ pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, 0, NULL, NULL, 0, 0);
146
fprintf(stderr, "%s %s... %s\n", msg,
147
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
148
strbuf_release(&sb);