author | Junio C Hamano <gitster@pobox.com> | |
Thu, 30 Jun 2011 00:03:10 +0000 (17:03 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 30 Jun 2011 00:03:10 +0000 (17:03 -0700) |
* jc/advice-about-to-lose-commit:
checkout: make advice when reattaching the HEAD less loud
Conflicts:
builtin/checkout.c
checkout: make advice when reattaching the HEAD less loud
Conflicts:
builtin/checkout.c
1 | 2 | |||
---|---|---|---|---|
builtin/checkout.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/checkout.c
index 28cdc51b85e7d433dca085c0080f964d19a391b4,90870d9537851bd60363bdc028afbe723046a340..015730fbd5c66eb60c3999ffbfaf33f07b841315
--- 1/builtin/checkout.c
--- 2/builtin/checkout.c
+++ b/builtin/checkout.c
}
fprintf(stderr,
- "Warning: you are leaving %d commit%s behind, "
+ Q_(
+ /* The singular version */
+ "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",
- lost, ((1 < lost) ? "s" : ""),
+ /* Give ngettext() the count */
+ lost),
+ lost,
- sb.buf,
- sha1_to_hex(commit->object.sha1));
+ sb.buf);
strbuf_release(&sb);
- " git branch new_branch_name %s\n\n",
+
+ 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));
}
/*