rebase -i: implement the logic to initialize $revisions in C
authorAlban Gruin <alban.gruin@gmail.com>
Tue, 28 Aug 2018 12:10:38 +0000 (14:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Aug 2018 20:38:18 +0000 (13:38 -0700)
commit6ab54d17be3f51153444d8efebb0ae363eb9b7c9
treedda057be5cd6400e10c5e78b0e9063c469824dc0
parent91f0d95dcb4dd9c388881b64a7d79a3809927126
rebase -i: implement the logic to initialize $revisions in C

This rewrites the part of init_revisions_and_shortrevisions() needed by
`--make-script` from shell to C.  The new version is called
get_revision_ranges(), and is a static function inside of
rebase--helper.c.  As this does not initialize $shortrevision, the
original shell version is not yet stripped.

Unlike init_revisions_and_shortrevisions(), get_revision_ranges()
doesn’t write $squash_onto to the state directory, it’s done by the
handler of `--make-script` instead.

Finally, this drops the $revision argument passed to `--make-script` in
git-rebase--interactive.sh, and rebase--helper is changed accordingly.

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase--helper.c
git-rebase--interactive.sh