checkout: support renormalization with checkout -m <paths>
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
8d552258f4
commit
00906d6f22
|
@ -239,6 +239,8 @@ static int checkout_merged(int pos, const struct checkout *state, int *nr_checko
|
||||||
mmbuffer_t result_buf;
|
mmbuffer_t result_buf;
|
||||||
struct object_id threeway[3];
|
struct object_id threeway[3];
|
||||||
unsigned mode = 0;
|
unsigned mode = 0;
|
||||||
|
struct ll_merge_options ll_opts;
|
||||||
|
int renormalize = 0;
|
||||||
|
|
||||||
memset(threeway, 0, sizeof(threeway));
|
memset(threeway, 0, sizeof(threeway));
|
||||||
while (pos < active_nr) {
|
while (pos < active_nr) {
|
||||||
|
@ -259,13 +261,12 @@ static int checkout_merged(int pos, const struct checkout *state, int *nr_checko
|
||||||
read_mmblob(&ours, &threeway[1]);
|
read_mmblob(&ours, &threeway[1]);
|
||||||
read_mmblob(&theirs, &threeway[2]);
|
read_mmblob(&theirs, &threeway[2]);
|
||||||
|
|
||||||
/*
|
memset(&ll_opts, 0, sizeof(ll_opts));
|
||||||
* NEEDSWORK: re-create conflicts from merges with
|
git_config_get_bool("merge.renormalize", &renormalize);
|
||||||
* merge.renormalize set, too
|
ll_opts.renormalize = renormalize;
|
||||||
*/
|
|
||||||
status = ll_merge(&result_buf, path, &ancestor, "base",
|
status = ll_merge(&result_buf, path, &ancestor, "base",
|
||||||
&ours, "ours", &theirs, "theirs",
|
&ours, "ours", &theirs, "theirs",
|
||||||
state->istate, NULL);
|
state->istate, &ll_opts);
|
||||||
free(ancestor.ptr);
|
free(ancestor.ptr);
|
||||||
free(ours.ptr);
|
free(ours.ptr);
|
||||||
free(theirs.ptr);
|
free(theirs.ptr);
|
||||||
|
|
Loading…
Reference in New Issue