diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-11-10 06:48:57 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-12 14:50:05 +0900 |
commit | 005af339c9ad292f9ae2fe3555d8d362a225ca45 (patch) | |
tree | e26ea41812a2455282021b64cbce525993d7eab8 /builtin | |
parent | sequencer.c: remove implicit dependency on the_index (diff) | |
download | tgif-005af339c9ad292f9ae2fe3555d8d362a225ca45.tar.xz |
sequencer.c: remove implicit dependency on the_repository
Note that the_hash_algo stays, even if we can easily replace it with
repo->hash_algo. My reason is I still believe tying hash_algo to a
struct repository is a wrong move. But if I'm wrong, we can always go
for another round of conversion.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rebase--interactive.c | 11 | ||||
-rw-r--r-- | builtin/revert.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/builtin/rebase--interactive.c b/builtin/rebase--interactive.c index b7ce48a1ec..d867050fd2 100644 --- a/builtin/rebase--interactive.c +++ b/builtin/rebase--interactive.c @@ -114,7 +114,8 @@ static int do_interactive_rebase(struct replay_opts *opts, unsigned flags, error(_("could not generate todo list")); else { discard_cache(); - ret = complete_action(opts, flags, shortrevisions, onto_name, onto, + ret = complete_action(the_repository, opts, flags, + shortrevisions, onto_name, onto, head_hash, cmd, autosquash); } @@ -252,16 +253,16 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix) } case SHORTEN_OIDS: case EXPAND_OIDS: - ret = transform_todos(flags); + ret = transform_todos(the_repository, flags); break; case CHECK_TODO_LIST: - ret = check_todo_list(); + ret = check_todo_list(the_repository); break; case REARRANGE_SQUASH: - ret = rearrange_squash(); + ret = rearrange_squash(the_repository); break; case ADD_EXEC: - ret = sequencer_add_exec_commands(cmd); + ret = sequencer_add_exec_commands(the_repository, cmd); break; default: BUG("invalid command '%d'", command); diff --git a/builtin/revert.c b/builtin/revert.c index cd9f068195..1fa75b2773 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -201,7 +201,7 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts) if (cmd == 'c') return sequencer_continue(the_repository, opts); if (cmd == 'a') - return sequencer_rollback(opts); + return sequencer_rollback(the_repository, opts); return sequencer_pick_revisions(the_repository, opts); } |