diff options
author | Alban Gruin <alban.gruin@gmail.com> | 2018-08-10 19:51:33 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-10 21:56:22 +0300 |
commit | 2c58483a5983d1313f674e2ba32b3bac24df6911 (patch) | |
tree | e0e3c8cf5baa90830e67db69b9d09593ab9e9fe5 /sequencer.h | |
parent | 34bec2c458474bdc05ced34d6789ee6c9fb7f051 (diff) |
rebase -i: rewrite setup_reflog_action() in C
This rewrites (the misnamed) setup_reflog_action() from shell to C. The
new version is called prepare_branch_to_be_rebased().
A new command is added to rebase--helper.c, “checkout-base”, as well as
a new flag, “verbose”, to avoid silencing the output of the checkout
operation called by checkout_base_commit().
The function `run_git_checkout()` will also be used in the next commit,
therefore its code is not part of `checkout_base_commit()`.
The shell version is then stripped in favour of a call to the helper.
As $GIT_REFLOG_ACTION is no longer set at the first call of
checkout_onto(), a call to comment_for_reflog() is added at the
beginning of this function.
Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r-- | sequencer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h index 792e448b67..f619b02a13 100644 --- a/sequencer.h +++ b/sequencer.h @@ -109,6 +109,8 @@ int update_head_with_reflog(const struct commit *old_head, 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); + #define SUMMARY_INITIAL_COMMIT (1 << 0) #define SUMMARY_SHOW_AUTHOR_DATE (1 << 1) void print_commit_summary(const char *prefix, const struct object_id *oid, |