Skip to content

Commit

Permalink
checkout: don't rfc2047-encode oneline on detached HEAD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
peff authored and gitster committed May 4, 2008
1 parent 2d8bed9 commit 2788631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static void describe_detached_head(char *msg, struct commit *commit)
struct strbuf sb;
strbuf_init(&sb, 0);
parse_commit(commit);
pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, 0, "", "", 0, 0);
pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, 0, NULL, NULL, 0, 0);
fprintf(stderr, "%s %s... %s\n", msg,
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
strbuf_release(&sb);
Expand Down

0 comments on commit 2788631

Please sign in to comment.