diff options
| author | Junio C Hamano <gitster@pobox.com> | 2008-08-29 10:49:56 -0700 | 
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2008-08-30 19:41:44 -0700 | 
| commit | b541248467fa47979a34e3f1c5bbe3308fbdc4d1 (patch) | |
| tree | af1b1accf5962ebb10b7422e5ec6479e78b31b66 /xdiff-interface.c | |
| parent | 387c9d49815ef4b1cefda71cf27f199d9fb24083 (diff) | |
| download | git-b541248467fa47979a34e3f1c5bbe3308fbdc4d1.tar.gz | |
merge.conflictstyle: choose between "merge" and "diff3 -m" styles
This teaches "git merge-file" to honor merge.conflictstyle configuration
variable, whose value can be "merge" (default) or "diff3".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff-interface.c')
| -rw-r--r-- | xdiff-interface.c | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/xdiff-interface.c b/xdiff-interface.c index 61dc5c5470..295198333d 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -237,3 +237,23 @@ void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value)  		value = ep + 1;  	}  } + +int git_xmerge_style = -1; + +int git_xmerge_config(const char *var, const char *value, void *cb) +{ +	if (!strcasecmp(var, "merge.conflictstyle")) { +		if (!value) +			die("'%s' is not a boolean", var); +		if (!strcmp(value, "diff3")) +			git_xmerge_style = XDL_MERGE_DIFF3; +		else if (!strcmp(value, "merge")) +			git_xmerge_style = 0; +		else +			die("unknown style '%s' given for '%s'", +			    value, var); +		return 0; +	} +	return git_default_config(var, value, cb); +} + | 
