From: Junio C Hamano Date: Mon, 30 Jul 2018 17:51:00 GMT Subject: Re: [PATCH v3 08/11] rerere: factor out handle_conflict function Message-ID: In-Reply-To: <20180714214443.7184-9-t.gummerer@gmail.com> Thomas Gummerer 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 > --- > 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;