Re: [GSoC][PATCH v2 3/3] rebase -i: rewrite checkout_onto() in C
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 21, 2018, 10:38 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1806211236350.11870@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20180619154421.14999-4-alban.gruin@gmail.com>
Hi Alban,
On Tue, 19 Jun 2018, Alban Gruin wrote:
Show 19 quoted lines
> diff --git a/sequencer.c b/sequencer.c
> index a7a73e3ef..9165bf96c 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -3161,6 +3161,25 @@ int checkout_base_commit(struct replay_opts *opts, const char *commit,
> return 0;
> }
>
> +int checkout_onto(struct replay_opts *opts,
> + const char *onto_name, const char *onto,
> + const char *orig_head, unsigned verbose)
> +{
> + struct object_id oid;
> + const char *action = reflog_message(opts, "start", "checkout %s", onto_name);
> +
> + if (get_oid(orig_head, &oid))
> + return error(_("%s: not a valid OID"), orig_head);
> +
> + if (run_git_checkout(opts, onto, verbose, action)) {Ah, so this is the reason for the split.
If you send a new iteration of this patch series, could you do me a favor and add a paragraph to the commit message of 2/3, saying something like this: "The function `run_git_checkout()` will be used on its own in the next commit, therefore the code is not folded into `checkout_base_commit()`? That way, I do not have to burden my working memory with this bit of information ;-)
Thanks, Dscho