From: Junio C Hamano Date: Mon, 8 Aug 2016 21:48:43 +0000 (-0700) Subject: Merge branch 'jh/clean-smudge-f-doc' X-Git-Tag: v2.10.0-rc0~34 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/104985c59eb5f318daf6732af9a2b7a9f63d0857?ds=inline;hp=-c Merge branch 'jh/clean-smudge-f-doc' A minor documentation update. * jh/clean-smudge-f-doc: clarify %f documentation --- 104985c59eb5f318daf6732af9a2b7a9f63d0857 diff --combined Documentation/gitattributes.txt index b40068bdfd,145dd10967..34db3e219b --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@@ -115,7 -115,6 +115,7 @@@ text file is normalized, its line endin repository. To control what line ending style is used in the working directory, use the `eol` attribute for a single file and the `core.eol` configuration variable for all text files. +Note that `core.autocrlf` overrides `core.eol` Set:: @@@ -131,9 -130,8 +131,9 @@@ Unset: Set to string value "auto":: When `text` is set to "auto", the path is marked for automatic - end-of-line normalization. If Git decides that the content is - text, its line endings are normalized to LF on checkin. + end-of-line conversion. If Git decides that the content is + text, its line endings are converted to LF on checkin. + When the file has been commited with CRLF, no conversion is done. Unspecified:: @@@ -148,7 -146,7 +148,7 @@@ unspecified ^^^^^ This attribute sets a specific line-ending style to be used in the -working directory. It enables end-of-line normalization without any +working directory. It enables end-of-line conversion without any content checks, effectively setting the `text` attribute. Set to string value "crlf":: @@@ -188,10 -186,9 +188,10 @@@ the working directory, and prevent .jp regardless of their content. ------------------------ +* text=auto *.txt text -*.vcproj eol=crlf -*.sh eol=lf +*.vcproj text eol=crlf +*.sh text eol=lf *.jpg -text ------------------------ @@@ -201,7 -198,7 +201,7 @@@ normalization in Git If you simply want to have CRLF line endings in your working directory regardless of the repository you are working with, you can set the -config variable "core.autocrlf" without changing any attributes. +config variable "core.autocrlf" without using any attributes. ------------------------ [core] @@@ -377,6 -374,11 +377,11 @@@ substitution. For example smudge = git-p4-filter --smudge %f ------------------------ + Note that "%f" is the name of the path that is being worked on. Depending + on the version that is being filtered, the corresponding file on disk may + not exist, or may have different contents. So, smudge and clean commands + should not try to access the file on disk, but only act as filters on the + content provided to them on standard input. Interaction between checkin/checkout attributes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@@ -528,8 -530,6 +533,8 @@@ patterns are available - `csharp` suitable for source code in the C# language. +- `css` suitable for cascading style sheets. + - `fortran` suitable for source code in the Fortran language. - `fountain` suitable for Fountain documents.