Thomas Gummerer <t.gumme...@gmail.com> writes:

> Factor out the handle_conflict function, which handles a single
> conflict in a path.  This is in preparation for a subsequent commit,
> where this function will be re-used.  No functional changes intended.
>
> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>
> ---
>  rerere.c | 87 ++++++++++++++++++++++++++++++--------------------------
>  1 file changed, 47 insertions(+), 40 deletions(-)

Renumbering of the enum made me raise my eyebrow a bit briefly but
it is merely to keep track of the state locally and invisible from
the outside, so it is perfectly fine.

> -     git_SHA_CTX ctx;
> -     int has_conflicts = 0;
>       enum {
> -             RR_CONTEXT = 0, RR_SIDE_1, RR_SIDE_2, RR_ORIGINAL
> -     } hunk = RR_CONTEXT;
> +             RR_SIDE_1 = 0, RR_SIDE_2, RR_ORIGINAL
> +     } hunk = RR_SIDE_1;

Reply via email to