@@ -1723,7 +1723,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
/*
* Check if we are already based on onto with linear history,
- * but this should be done if this is not an interactive rebase.
+ * in which case we could fast-forward without replacing the commits
+ * with new commits recreated by replaying their changes. This
+ * optimization must not be done if this is an interactive rebase.
*/
if (can_fast_forward(options.onto, options.upstream, options.restrict_revision,
&options.orig_head, &merge_base) &&
@@ -2027,7 +2027,7 @@ _git_rebase ()
--autosquash --no-autosquash
--fork-point --no-fork-point
--autostash --no-autostash
- --verify --no-verify
+ --verify --no-verify --keep-base
--keep-empty --root --force-rebase --no-ff
--rerere-autoupdate
--exec