Skip to content

Commit 00906d6

Browse files
newrengitster
authored andcommitted
checkout: support renormalization with checkout -m <paths>
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8d55225 commit 00906d6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

builtin/checkout.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ static int checkout_merged(int pos, const struct checkout *state, int *nr_checko
239239
mmbuffer_t result_buf;
240240
struct object_id threeway[3];
241241
unsigned mode = 0;
242+
struct ll_merge_options ll_opts;
243+
int renormalize = 0;
242244

243245
memset(threeway, 0, sizeof(threeway));
244246
while (pos < active_nr) {
@@ -259,13 +261,12 @@ static int checkout_merged(int pos, const struct checkout *state, int *nr_checko
259261
read_mmblob(&ours, &threeway[1]);
260262
read_mmblob(&theirs, &threeway[2]);
261263

262-
/*
263-
* NEEDSWORK: re-create conflicts from merges with
264-
* merge.renormalize set, too
265-
*/
264+
memset(&ll_opts, 0, sizeof(ll_opts));
265+
git_config_get_bool("merge.renormalize", &renormalize);
266+
ll_opts.renormalize = renormalize;
266267
status = ll_merge(&result_buf, path, &ancestor, "base",
267268
&ours, "ours", &theirs, "theirs",
268-
state->istate, NULL);
269+
state->istate, &ll_opts);
269270
free(ancestor.ptr);
270271
free(ours.ptr);
271272
free(theirs.ptr);

0 commit comments

Comments
 (0)