aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-merge-file.txt
diff options
context:
space:
mode:
authorAntonin Delpeuch <antonin@delpeuch.eu>2023-11-20 19:18:52 +0000
committerJunio C Hamano <gitster@pobox.com>2023-11-22 14:23:06 +0900
commit4f7fd79e57f483282bc21bf5b0669f9c8229d32a (patch)
treebdb53d009940ab6aa32c4f903c7fc8030769635f /Documentation/git-merge-file.txt
parent564d0252ca632e0264ed670534a51d18a689ef5d (diff)
downloadgit-4f7fd79e57f483282bc21bf5b0669f9c8229d32a.tar.gz
merge-file: add --diff-algorithm option
Make it possible to use other diff algorithms than the 'myers' default algorithm, when using the 'git merge-file' command, to help avoid spurious conflicts by selecting a more recent algorithm such as 'histogram', for instance when using 'git merge-file' as part of a custom merge driver. Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu> Reviewed-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-merge-file.txt')
-rw-r--r--Documentation/git-merge-file.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/git-merge-file.txt b/Documentation/git-merge-file.txt
index 6a081eacb7..71915a00fa 100644
--- a/Documentation/git-merge-file.txt
+++ b/Documentation/git-merge-file.txt
@@ -92,6 +92,12 @@ object store and the object ID of its blob is written to standard output.
Instead of leaving conflicts in the file, resolve conflicts
favouring our (or their or both) side of the lines.
+--diff-algorithm={patience|minimal|histogram|myers}::
+ Use a different diff algorithm while merging. The current default is "myers",
+ but selecting more recent algorithm such as "histogram" can help
+ avoid mismerges that occur due to unimportant matching lines
+ (such as braces from distinct functions). See also
+ linkgit:git-diff[1] `--diff-algorithm`.
EXAMPLES
--------