diff: convert diff_change to struct object_id
[gitweb.git] / builtin / read-tree.c
index daf8d7795d5c7e120abacb9a1324869ba81eeb19..78d3193659e06b4969324153689f219f1cd1c1b3 100644 (file)
@@ -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;