summaryrefslogtreecommitdiff
path: root/xdiff-interface.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-09-29 17:04:21 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-09-29 17:15:07 (GMT)
commit9ba929ed652f5ed7707f1c684999af4ad02c4925 (patch)
tree434d9a7552de1c2dffaf723120fc90d83aa52743 /xdiff-interface.c
parentc11c7a5db3676258512c4067c5279377811d3ab8 (diff)
parent3407a7a9e67b165902be85b0807e9ea789b3c67d (diff)
downloadgit-9ba929ed652f5ed7707f1c684999af4ad02c4925.zip
git-9ba929ed652f5ed7707f1c684999af4ad02c4925.tar.gz
git-9ba929ed652f5ed7707f1c684999af4ad02c4925.tar.bz2
Merge branch 'jc/better-conflict-resolution'
* jc/better-conflict-resolution: Fix AsciiDoc errors in merge documentation git-merge documentation: describe how conflict is presented checkout --conflict=<style>: recreate merge in a non-default style checkout -m: recreate merge when checking out of unmerged index git-merge-recursive: learn to honor merge.conflictstyle merge.conflictstyle: choose between "merge" and "diff3 -m" styles rerere: understand "diff3 -m" style conflicts with the original rerere.c: use symbolic constants to keep track of parsing states xmerge.c: "diff3 -m" style clips merge reduction level to EAGER or less xmerge.c: minimum readability fixups xdiff-merge: optionally show conflicts in "diff3 -m" style xdl_fill_merge_buffer(): separate out a too deeply nested function checkout --ours/--theirs: allow checking out one side of a conflicting merge checkout -f: allow ignoring unmerged paths when checking out of the index Conflicts: Documentation/git-checkout.txt builtin-checkout.c builtin-merge-recursive.c t/t7201-co.sh
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r--xdiff-interface.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c
index 944ad98..8457601 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -249,3 +249,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);
+}
+