Skip to content

Commit 2788631

Browse files
peffgitster
authored andcommitted
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 <[email protected]>
1 parent 2d8bed9 commit 2788631

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static void describe_detached_head(char *msg, struct commit *commit)
142142
struct strbuf sb;
143143
strbuf_init(&sb, 0);
144144
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);
146146
fprintf(stderr, "%s %s... %s\n", msg,
147147
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
148148
strbuf_release(&sb);

0 commit comments

Comments
 (0)