cherry-pick: add tests for new --ff option