Anonymous committed 2788631

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 <>

  • Participants
  • Parent commits 2d8bed9

Comments (0)

Files changed (1)


 	struct strbuf sb;
 	strbuf_init(&sb, 0);
-	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);