summaryrefslogtreecommitdiffstats
path: root/gitattributes.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junio@kernel.org>2010-09-03 21:33:06 +0000
committerJunio C Hamano <junio@kernel.org>2010-09-03 21:33:06 +0000
commit2db3e750d172a78dadfb29235ad2a2c3c8d45a24 (patch)
tree1f66627398f37b23ec3af2697514d33d25060d96 /gitattributes.txt
parentd7ae629d13f3242b66070b20f4bb83486948150a (diff)
downloadgit-htmldocs-2db3e750d172a78dadfb29235ad2a2c3c8d45a24.tar.gz
Autogenerated HTML docs for v1.7.2.3-313-gcd15
Diffstat (limited to 'gitattributes.txt')
-rw-r--r--gitattributes.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/gitattributes.txt b/gitattributes.txt
index 2e2370ccd..e5a27d875 100644
--- a/gitattributes.txt
+++ b/gitattributes.txt
@@ -317,6 +317,17 @@ command is "cat").
smudge = cat
------------------------
+For best results, `clean` should not alter its output further if it is
+run twice ("clean->clean" should be equivalent to "clean"), and
+multiple `smudge` commands should not alter `clean`'s output
+("smudge->smudge->clean" should be equivalent to "clean"). See the
+section on merging below.
+
+The "indent" filter is well-behaved in this regard: it will not modify
+input that is already correctly indented. In this case, the lack of a
+smudge filter means that the clean filter _must_ accept its own output
+without modifying it.
+
Interaction between checkin/checkout attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -331,6 +342,29 @@ In the check-out codepath, the blob content is first converted
with `text`, and then `ident` and fed to `filter`.
+Merging branches with differing checkin/checkout attributes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If you have added attributes to a file that cause the canonical
+repository format for that file to change, such as adding a
+clean/smudge filter or text/eol/ident attributes, merging anything
+where the attribute is not in place would normally cause merge
+conflicts.
+
+To prevent these unnecessary merge conflicts, git can be told to run a
+virtual check-out and check-in of all three stages of a file when
+resolving a three-way merge by setting the `merge.renormalize`
+configuration variable. This prevents changes caused by check-in
+conversion from causing spurious merge conflicts when a converted file
+is merged with an unconverted file.
+
+As long as a "smudge->clean" results in the same output as a "clean"
+even on files that are already smudged, this strategy will
+automatically resolve all filter-related conflicts. Filters that do
+not act in this way may cause additional merge conflicts that must be
+resolved manually.
+
+
Generating diff text
~~~~~~~~~~~~~~~~~~~~