Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyvind Bernhardsen <eyvind.bernhardsen@gmail.com>2010-07-02 23:20:47 +0400
committerJunio C Hamano <gitster@pobox.com>2010-07-03 02:43:15 +0400
commitf217f0e86dc7bacc5dc127982eaadca758b558ce (patch)
treeffd4e74f1b5fb99e6434351354487f2d08c039f3 /Documentation/merge-config.txt
parent492b10766f499b60bdc867c253f36d274ac51538 (diff)
Avoid conflicts when merging branches with mixed normalization
Currently, merging across changes in line ending normalization is painful since files containing CRLF will conflict with normalized files, even if the only difference between the two versions is the line endings. Additionally, any "real" merge conflicts that exist are obscured because every line in the file has a conflict. Assume you start out with a repo that has a lot of text files with CRLF checked in (A): o---C / \ A---B---D B: Add "* text=auto" to .gitattributes and normalize all files to LF-only C: Modify some of the text files D: Try to merge C You will get a ridiculous number of LF/CRLF conflicts when trying to merge C into D, since the repository contents for C are "wrong" wrt the new .gitattributes file. Fix ll-merge so that the "base", "theirs" and "ours" stages are passed through convert_to_worktree() and convert_to_git() before a three-way merge. This ensures that all three stages are normalized in the same way, removing from consideration differences that are only due to normalization. This feature is optional for now since it changes a low-level mechanism and is not necessary for the majority of users. The "merge.renormalize" config variable enables it. Signed-off-by: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/merge-config.txt')
-rw-r--r--Documentation/merge-config.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt
index a403155052..b72f533970 100644
--- a/Documentation/merge-config.txt
+++ b/Documentation/merge-config.txt
@@ -15,6 +15,16 @@ merge.renameLimit::
during a merge; if not specified, defaults to the value of
diff.renameLimit.
+merge.renormalize::
+ Tell git that canonical representation of files in the
+ repository has changed over time (e.g. earlier commits record
+ text files with CRLF line endings, but recent ones use LF line
+ endings). In such a repository, git can convert the data
+ recorded in commits to a canonical form before performing a
+ merge to reduce unnecessary conflicts. For more information,
+ see section "Merging branches with differing checkin/checkout
+ attributes" in linkgit:gitattributes[5].
+
merge.stat::
Whether to print the diffstat between ORIG_HEAD and the merge result
at the end of the merge. True by default.