mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Merge branch 'rs/rebase-commit-validation'
Diagnose command line error of "git rebase" early. * rs/rebase-commit-validation: rebase: verify commit parameter
This commit is contained in:
commit
df26861c56
|
@ -1917,7 +1917,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
|
||||||
die_if_checked_out(buf.buf, 1);
|
die_if_checked_out(buf.buf, 1);
|
||||||
options.head_name = xstrdup(buf.buf);
|
options.head_name = xstrdup(buf.buf);
|
||||||
/* If not is it a valid ref (branch or commit)? */
|
/* If not is it a valid ref (branch or commit)? */
|
||||||
} else if (!get_oid(branch_name, &options.orig_head))
|
} else if (!get_oid(branch_name, &options.orig_head) &&
|
||||||
|
lookup_commit_reference(the_repository,
|
||||||
|
&options.orig_head))
|
||||||
options.head_name = NULL;
|
options.head_name = NULL;
|
||||||
else
|
else
|
||||||
die(_("fatal: no such branch/commit '%s'"),
|
die(_("fatal: no such branch/commit '%s'"),
|
||||||
|
|
Loading…
Reference in a new issue