File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -657,24 +657,25 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
657657 "Warning: you are leaving %d commit behind, "
658658 "not connected to\n"
659659 "any of your branches:\n\n"
660- "%s\n"
661- "If you want to keep it by creating a new branch, "
662- "this may be a good time\nto do so with:\n\n"
663- " git branch new_branch_name %s\n\n" ,
660+ "%s\n" ,
664661 /* The plural version */
665662 "Warning: you are leaving %d commits behind, "
666663 "not connected to\n"
667664 "any of your branches:\n\n"
668- "%s\n"
669- "If you want to keep them by creating a new branch, "
670- "this may be a good time\nto do so with:\n\n"
671- " git branch new_branch_name %s\n\n" ,
665+ "%s\n" ,
672666 /* Give ngettext() the count */
673667 lost ),
674668 lost ,
675- sb .buf ,
676- sha1_to_hex (commit -> object .sha1 ));
669+ sb .buf );
677670 strbuf_release (& sb );
671+
672+ if (advice_detached_head )
673+ fprintf (stderr ,
674+ _ (
675+ "If you want to keep them by creating a new branch, "
676+ "this may be a good time\nto do so with:\n\n"
677+ " git branch new_branch_name %s\n\n" ),
678+ sha1_to_hex (commit -> object .sha1 ));
678679}
679680
680681/*
You can’t perform that action at this time.
0 commit comments