sequencer: rename reset_for_rollback to reset_merge

We are on a path to teach cherry-pick/revert how to skip commits. To achieve this, we could really make use of existing functions. reset_for_rollback is one such function, but the name does not intuitively suggest to use it to reset a merge, which it was born to perform, see 539047c ("revert: introduce --abort to cancel a failed cherry-pick", 2011-11-23). Change the name to reset_merge to make it more intuitive. Signed-off-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Rohit Ashiwal committed Jul 2, 2019 at 14:41 UTC 918d1e6ed89738afad63a5cfc92668ac77a7be95
1 file changed +3 -3
sequencer.c
+3 -3
@@ -2732,7 +2732,7 @@ static int rollback_is_safe(void)
2732 return oideq(&actual_head, &expected_head);
2733 }
2734
2735 -static int reset_for_rollback(const struct object_id *oid)
2735 +static int reset_merge(const struct object_id *oid)
2736 {
2737 const char *argv[4]; /* reset --merge <arg> + NULL */
2738
@@ -2754,7 +2754,7 @@ static int rollback_single_pick(struct repository *r)
2754 return error(_("cannot resolve HEAD"));
2755 if (is_null_oid(&head_oid))
2756 return error(_("cannot abort from a branch yet to be born"));
2757 - return reset_for_rollback(&head_oid);
2757 + return reset_merge(&head_oid);
2758 }
2759
2760 int sequencer_rollback(struct repository *r, struct replay_opts *opts)
@@ -2797,7 +2797,7 @@ int sequencer_rollback(struct repository *r, struct replay_opts *opts)
2797 warning(_("You seem to have moved HEAD. "
2798 "Not rewinding, check your HEAD!"));
2799 } else
2800 - if (reset_for_rollback(&oid))
2800 + if (reset_merge(&oid))
2801 goto fail;
2802 strbuf_release(&buf);
2803 return sequencer_remove_state(opts);