Merge branch 'jh/clean-smudge-f-doc'
authorJunio C Hamano <gitster@pobox.com>
Mon, 8 Aug 2016 21:48:43 +0000 (14:48 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Aug 2016 21:48:43 +0000 (14:48 -0700)
A minor documentation update.

* jh/clean-smudge-f-doc:
clarify %f documentation

1  2 
Documentation/gitattributes.txt
index b40068bdfd14767fbfa659576f434944f4225b5e,145dd10967cd3654fb331b8c5d6a1e3e622ef6ef..34db3e219b285f13f8435ebd5307c2185fec15bf
@@@ -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.