From 65850686cf072d6de88880247adb7113db8a52f2 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Tue, 28 Aug 2018 14:10:40 +0200 Subject: rebase -i: rewrite write_basic_state() in C This rewrites write_basic_state() from git-rebase.sh in C. This is the first step in the conversion of init_basic_state(), hence the mode in rebase--helper.c is called INIT_BASIC_STATE. init_basic_state() will be converted in the next commit. The part of read_strategy_opts() that parses the stategy options is moved to a new function to allow its use in rebase--helper.c. Finally, the call to write_basic_state() is removed from git-rebase--interactive.sh, replaced by a call to `--init-basic-state`. Signed-off-by: Alban Gruin Signed-off-by: Junio C Hamano --- sequencer.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sequencer.h') diff --git a/sequencer.h b/sequencer.h index 02e3d7940e..aab280f276 100644 --- a/sequencer.h +++ b/sequencer.h @@ -119,3 +119,7 @@ int prepare_branch_to_be_rebased(struct replay_opts *opts, const char *commit); void print_commit_summary(const char *prefix, const struct object_id *oid, unsigned int flags); #endif + +void parse_strategy_opts(struct replay_opts *opts, char *raw_opts); +int write_basic_state(struct replay_opts *opts, const char *head_name, + const char *onto, const char *orig_head); -- cgit v1.2.3