Merge branch 'ab/range-diff-no-patch'
[gitweb.git] / builtin / rebase.c
index d8e4e0e3a9275dfd02c4b5c16ce8bd35e0dc1fd2..b84568fc4e6677e5f68c3b11e0798942ae19577a 100644 (file)
@@ -689,7 +689,7 @@ static int can_fast_forward(struct commit *onto, struct object_id *head_oid,
        merge_bases = get_merge_bases(onto, head);
        if (merge_bases && !merge_bases->next) {
                oidcpy(merge_base, &merge_bases->item->object.oid);
-               res = !oidcmp(merge_base, &onto->object.oid);
+               res = oideq(merge_base, &onto->object.oid);
        } else {
                oidcpy(merge_base, &null_oid);
                res = 0;
@@ -703,6 +703,9 @@ static int parse_opt_merge(const struct option *opt, const char *arg, int unset)
 {
        struct rebase_options *opts = opt->value;
 
+       BUG_ON_OPT_NEG(unset);
+       BUG_ON_OPT_ARG(arg);
+
        if (!is_interactive(opts))
                opts->type = REBASE_MERGE;
 
@@ -715,6 +718,9 @@ static int parse_opt_interactive(const struct option *opt, const char *arg,
 {
        struct rebase_options *opts = opt->value;
 
+       BUG_ON_OPT_NEG(unset);
+       BUG_ON_OPT_ARG(arg);
+
        opts->type = REBASE_INTERACTIVE;
        opts->flags |= REBASE_INTERACTIVE_EXPLICIT;