diff-parseopt: convert -a|--text
[gitweb.git] / sequencer.c
index 4f1cb5e38fe77171cbcb7c070a1b5557d0bdcd6a..f5370f49659a3da10c8092c0b1682da08a1fab07 100644 (file)
@@ -1790,9 +1790,13 @@ static int do_pick_commit(struct repository *r,
                        return error(_("commit %s does not have parent %d"),
                                oid_to_hex(&commit->object.oid), opts->mainline);
                parent = p->item;
-       } else if (0 < opts->mainline)
-               return error(_("mainline was specified but commit %s is not a merge."),
-                       oid_to_hex(&commit->object.oid));
+       } else if (1 < opts->mainline)
+               /*
+                *  Non-first parent explicitly specified as mainline for
+                *  non-merge commit
+                */
+               return error(_("commit %s does not have parent %d"),
+                            oid_to_hex(&commit->object.oid), opts->mainline);
        else
                parent = commit->parents->item;