Elijah Newren via GitGitGadget wrote: > From: Elijah Newren <newren@xxxxxxxxx> > > The interaction of rebase and merge flags and options was not well > tested. Add several tests to check for correct behavior from the > following rules: > * --ff-only vs. --[no-]rebase > (and the related pull.ff=only vs. pull.rebase) > * --rebase[=!false] vs. --no-ff and --ff > (and the related pull.rebase=!false overrides pull.ff=!only) This breaks current behavior. > * command line flags take precedence over config, except: > * --no-rebase heeds pull.ff=!only > * pull.rebase=!false vs --no-ff and --ff This isn't explaind anywhere. > --- a/t/t7601-merge-pull-config.sh > +++ b/t/t7601-merge-pull-config.sh > @@ -143,6 +143,188 @@ > +# > +# Group 1: Interaction of --ff-only with --[no-]rebase > +# (And related interaction of pull.ff=only with pull.rebase) > +# > +test_expect_failure '--ff-only overrides --rebase' ' > + test_attempts_fast_forward pull --rebase --ff-only > +' > + > +test_expect_failure '--ff-only overrides --rebase even if first' ' > + test_attempts_fast_forward pull --ff-only --rebase > +' > + > +test_expect_success '--ff-only overrides --no-rebase' ' > + test_attempts_fast_forward pull --ff-only --no-rebase > +' These make absolutely no sense. Why does --rebase override pull.ff=only, but not --ff-only? > +test_expect_failure 'pull.ff=only overrides pull.rebase=true' ' > + test_attempts_fast_forward -c pull.ff=only -c pull.rebase=true pull > +' > + > +test_expect_success 'pull.ff=only overrides pull.rebase=false' ' > + test_attempts_fast_forward -c pull.ff=only -c pull.rebase=false pull > +' This breaks existing behavior. Users expect `-c pull.ff=only -c pull.rebase=true` to do a rebase. > +test_expect_failure '--no-rebase takes precedence over pull.ff=only' ' > + test_falls_back_to_full_merge -c pull.ff=only pull --no-rebase > +' This breaks existing behavior. -- Felipe Contreras