Re: [PATCH v3 08/11] rerere: factor out handle_conflict function
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 30, 2018, 17:51 UTC
- Message-ID
- <xmqqwotcfw8r.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180714214443.7184-9-t.gummerer@gmail.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
Show 8 quoted lines
> 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.gummerer@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.
Show 7 quoted lines
> - 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;