summaryrefslogtreecommitdiff
path: root/builtin/read-tree.c
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/read-tree.c
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/read-tree.c')
-rw-r--r--builtin/read-tree.c5
1 files changed, 3 insertions, 2 deletions
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;