Skip to content

Commit 52db4b0

Browse files
joeyhgitster
authored andcommitted
clarify %f documentation
It's natural to expect %f to be an actual file on disk; help avoid that mistake. Signed-off-by: Joey Hess <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 08df31e commit 52db4b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/gitattributes.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ substitution. For example:
374374
smudge = git-p4-filter --smudge %f
375375
------------------------
376376

377+
Note that "%f" is the name of the path that is being worked on. Depending
378+
on the version that is being filtered, the corresponding file on disk may
379+
not exist, or may have different contents. So, smudge and clean commands
380+
should not try to access the file on disk, but only act as filters on the
381+
content provided to them on standard input.
377382

378383
Interaction between checkin/checkout attributes
379384
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)