summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-05-29 12:34:48 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-29 12:34:48 +0900
commite6381080a7dd44e14fba81b5e3714661343d8e62 (patch)
tree7f301cb317d03ea1d66401dc57d13d15caf0bf6b /builtin
parentMerge branch 'jk/doc-config-include' (diff)
parentgit-filter-branch: be more direct in an error message (diff)
downloadtgif-e6381080a7dd44e14fba81b5e3714661343d8e62.tar.xz
Merge branch 'ja/do-not-ask-needless-questions'
Git sometimes gives an advice in a rhetorical question that does not require an answer, which can confuse new users and non native speakers. Attempt to rephrase them. * ja/do-not-ask-needless-questions: git-filter-branch: be more direct in an error message read-tree -m: make error message for merging 0 trees less smart aleck usability: don't ask questions if no reply is required
Diffstat (limited to 'builtin')
-rw-r--r--builtin/am.c5
-rw-r--r--builtin/checkout.c5
-rw-r--r--builtin/read-tree.c5
3 files changed, 8 insertions, 7 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 8b218f9978..0f63dcab16 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1312,7 +1312,7 @@ static int parse_mail(struct am_state *state, const char *mail)
}
if (is_empty_file(am_path(state, "patch"))) {
- printf_ln(_("Patch is empty. Was it split wrong?"));
+ printf_ln(_("Patch is empty."));
die_user_resolve(state);
}
@@ -1931,7 +1931,8 @@ static void am_resolve(struct am_state *state)
if (unmerged_cache()) {
printf_ln(_("You still have unmerged paths in your index.\n"
- "Did you forget to use 'git add'?"));
+ "You should 'git add' each file with resolved conflicts to mark them as such.\n"
+ "You might run `git rm` on a file to accept \"deleted by them\" for it."));
die_user_resolve(state);
}
diff --git a/builtin/checkout.c b/builtin/checkout.c
index b6249a3a39..a6b2af39d3 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1289,9 +1289,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
* new_branch && argc > 1 will be caught later.
*/
if (opts.new_branch && argc == 1)
- die(_("Cannot update paths and switch to branch '%s' at the same time.\n"
- "Did you intend to checkout '%s' which can not be resolved as commit?"),
- opts.new_branch, argv[0]);
+ die(_("'%s' is not a commit and a branch '%s' cannot be created from it"),
+ argv[0], opts.new_branch);
if (opts.force_detach)
die(_("git checkout: --detach does not take a path argument '%s'"),
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index daf8d7795d..78d3193659 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -226,9 +226,10 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
setup_work_tree();
if (opts.merge) {
- if (stage < 2)
- die("just how do you expect me to merge %d trees?", stage-1);
switch (stage - 1) {
+ case 0:
+ die("you must specify at least one tree to merge");
+ break;
case 1:
opts.fn = opts.prefix ? bind_merge : oneway_merge;
break;