Skip to content

Commit

Permalink
Merge branch 'jc/advice-about-to-lose-commit'
Browse files Browse the repository at this point in the history
* jc/advice-about-to-lose-commit:
  checkout: make advice when reattaching the HEAD less loud

Conflicts:
	builtin/checkout.c
  • Loading branch information
Junio C Hamano committed Jun 30, 2011
2 parents dbae1a1 + f807b3d commit 0faf247
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,24 +657,25 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
"Warning: you are leaving %d commit behind, "
"not connected to\n"
"any of your branches:\n\n"
"%s\n"
"If you want to keep it by creating a new branch, "
"this may be a good time\nto do so with:\n\n"
" git branch new_branch_name %s\n\n",
"%s\n",
/* The plural version */
"Warning: you are leaving %d commits behind, "
"not connected to\n"
"any of your branches:\n\n"
"%s\n"
"If you want to keep them by creating a new branch, "
"this may be a good time\nto do so with:\n\n"
" git branch new_branch_name %s\n\n",
"%s\n",
/* Give ngettext() the count */
lost),
lost,
sb.buf,
sha1_to_hex(commit->object.sha1));
sb.buf);
strbuf_release(&sb);

if (advice_detached_head)
fprintf(stderr,
_(
"If you want to keep them by creating a new branch, "
"this may be a good time\nto do so with:\n\n"
" git branch new_branch_name %s\n\n"),
sha1_to_hex(commit->object.sha1));
}

/*
Expand Down

0 comments on commit 0faf247

Please sign in to comment.