]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/rebase.c
reset_head(): take struct rebase_head_opts
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Wed, 26 Jan 2022 13:05:46 +0000 (13:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Jan 2022 20:08:53 +0000 (12:08 -0800)
commit6ae8086161d81a707ff36dfdc07f57e4f473e0fd
treec8ae915a87b20a34794f3a56e4d496af46c8d35e
parentee464c4e37c7f34c4e5ba2fce35df4149083e5ea
reset_head(): take struct rebase_head_opts

This function takes a confusingly large number of parameters which
makes it difficult to remember which order to pass them in. The
following commits will add a couple more parameters which makes the
problem worse. To address this change the function to take a struct of
options. Using a struct means that it is no longer necessary to
remember which order to pass the parameters in and anyone reading the
code can easily see which value is passed to each parameter.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c
reset.c
reset.h
sequencer.c