Re: [GSoC][PATCH v3 12/13] rebase -i: implement the logic to initialize the variable $revision in C

2018-07-12 Thread Junio C Hamano
Junio C Hamano writes: > If I am reading the body of this if() block correctly, I think it > does everything init_revisions_and_shortrevisions shell function > does, i.e. compute $revisions for both cases with or without > upstream and write squash-onto state if needed, so that we can call > the

Re: [GSoC][PATCH v3 12/13] rebase -i: implement the logic to initialize the variable $revision in C

2018-07-12 Thread Junio C Hamano
Alban Gruin writes: > @@ -50,6 +71,13 @@ int cmd_rebase__helper(int argc, const char **argv, const > char *prefix) > N_("prepare the branch to be rebased"), > PREPARE_BRANCH), > OPT_CMDMODE(0, "complete-action", , > N_("complete

[GSoC][PATCH v3 12/13] rebase -i: implement the logic to initialize the variable $revision in C

2018-07-10 Thread Alban Gruin
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. Unlike init_revisions_and_shortrevisions(), get_revision_ranges() doesn’t write