rebase -i: rewrite checkout_onto() in C

This rewrites checkout_onto() from shell to C.

A new command (“checkout-onto”) is added to rebase--helper.c. The shell
version is then stripped.

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alban Gruin
2018-08-10 18:51:34 +02:00
committed by Junio C Hamano
parent 2c58483a59
commit 4df66c40b0
4 changed files with 32 additions and 22 deletions

View File

@ -110,6 +110,9 @@ void commit_post_rewrite(const struct commit *current_head,
const struct object_id *new_head);
int prepare_branch_to_be_rebased(struct replay_opts *opts, const char *commit);
int checkout_onto(struct replay_opts *opts,
const char *onto_name, const char *onto,
const char *orig_head);
#define SUMMARY_INITIAL_COMMIT (1 << 0)
#define SUMMARY_SHOW_AUTHOR_DATE (1 << 1)