Skip to content

Commit 091489d

Browse files
Denton-Lgitster
authored andcommitted
apply: respect merge.conflictStyle in --3way
Before, when doing a 3-way merge, the merge.conflictStyle option was not respected and the "merge" style was always used, even if "diff3" was specified. Call git_xmerge_config() at the end of git_apply_config() so that the merge.conflictStyle config is read. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aa76ae4 commit 091489d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void git_apply_config(void)
3232
{
3333
git_config_get_string_const("apply.whitespace", &apply_default_whitespace);
3434
git_config_get_string_const("apply.ignorewhitespace", &apply_default_ignorewhitespace);
35-
git_config(git_default_config, NULL);
35+
git_config(git_xmerge_config, NULL);
3636
}
3737

3838
static int parse_whitespace_option(struct apply_state *state, const char *option)

t/t4108-apply-threeway.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ test_expect_success 'apply with --3way' '
7373
test_apply_with_3way
7474
'
7575

76-
test_expect_failure 'apply with --3way with merge.conflictStyle = diff3' '
76+
test_expect_success 'apply with --3way with merge.conflictStyle = diff3' '
7777
test_config merge.conflictStyle diff3 &&
7878
test_apply_with_3way
7979
'

0 commit comments

Comments
 (0)