Merge branch 'en/rebase-root-and-fork-point-are-incompatible'

Incompatible options "--root" and "--fork-point" of "git rebase"
have been marked and documented as being incompatible.

* en/rebase-root-and-fork-point-are-incompatible:
  rebase: display an error if --root and --fork-point are both provided
This commit is contained in:
Junio C Hamano
2020-05-01 13:39:58 -07:00
2 changed files with 8 additions and 2 deletions

View File

@ -1481,6 +1481,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
die(_("cannot combine '--keep-base' with '--root'"));
}
if (options.root && fork_point > 0)
die(_("cannot combine '--root' with '--fork-point'"));
if (action != ACTION_NONE && !in_progress)
die(_("No rebase in progress?"));
setenv(GIT_REFLOG_ACTION_ENVIRONMENT, "rebase", 0);