]> git.ipfire.org Git - thirdparty/git.git/commit
rebase: really just passthru the `git am` options
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 14 Nov 2018 16:25:29 +0000 (08:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Nov 2018 02:52:13 +0000 (11:52 +0900)
commitf57696802c300494562f4287e88f07540b3dbd4a
tree5c5cd604fcef15b0f93d231d9c06850726c794de
parentd166e6afe5f257217836ef24a73764eba390c58d
rebase: really just passthru the `git am` options

Currently, we parse the options intended for `git am` as if we wanted to
handle them in `git rebase`, and then reconstruct them painstakingly to
define the `git_am_opt` variable.

However, there is a much better way (that I was unaware of, at the time
when I mentored Pratik to implement these options): OPT_PASSTHRU_ARGV.
It is intended for exactly this use case, where command-line options
want to be parsed into a separate `argv_array`.

Let's use this feature.

Incidentally, this also allows us to address a bug discovered by Phillip
Wood, where the built-in rebase failed to understand that the `-C`
option takes an optional argument.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c