summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-read-tree.txt2
-rw-r--r--builtin/read-tree.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index fa1d557..6bb725b 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -131,7 +131,7 @@ Merging
-------
If `-m` is specified, 'git read-tree' can perform 3 kinds of
merge, a single tree merge if only 1 tree is given, a
-fast-forward merge with 2 trees, or a 3-way merge if 3 trees are
+fast-forward merge with 2 trees, or a 3-way merge if 3 or more trees are
provided.
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 8ba64bc..8eae1e8 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -197,9 +197,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;