aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-21 19:09:02 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-24 22:38:51 -0700
commit3fed15f568c24ec00ef78fddc6cbb881fbbb0277 (patch)
treeae1ea1d4895be89d90d8e801a717ca569e363ac0 /Documentation
parentda94faf671c6b7c4db1ae07137bd93e31e232b4c (diff)
downloadgit-3fed15f568c24ec00ef78fddc6cbb881fbbb0277.tar.gz
git-3fed15f568c24ec00ef78fddc6cbb881fbbb0277.tar.xz
Add 'ident' conversion.
The 'ident' attribute set to path squashes "$ident:<any bytes except dollor sign>$" to "$ident$" upon checkin, and expands it to "$ident: <blob SHA-1> $" upon checkout. As we have two conversions that affect checkin/checkout paths, clarify how they interact with each other. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitattributes.txt31
1 files changed, 29 insertions, 2 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 857d55a40..b6f90f6f3 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -78,12 +78,17 @@ are attributes-aware.
Checking-out and checking-in
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The attribute `crlf` affects how the contents stored in the
+These attributes affect how the contents stored in the
repository are copied to the working tree files when commands
-such as `git checkout` and `git merge` run. It also affects how
+such as `git checkout` and `git merge` run. They also affect how
git stores the contents you prepare in the working tree in the
repository upon `git add` and `git commit`.
+`crlf`
+^^^^^^
+
+This attribute controls the line-ending convention.
+
Set::
Setting the `crlf` attribute on a path is meant to mark
@@ -129,6 +134,28 @@ converted to LF upon checkin, but there is no conversion done
upon checkout.
+`ident`
+^^^^^^^
+
+When the attribute `ident` is set to a path, git replaces
+`$ident$` in the blob object with `$ident:`, followed by
+40-character hexadecimal blob object name, followed by a dollar
+sign `$` upon checkout. Any byte sequence that begins with
+`$ident:` and ends with `$` in the worktree file is replaced
+with `$ident$` upon check-in.
+
+
+Interaction between checkin/checkout attributes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the check-in codepath, the worktree file is first converted
+with `ident` (if specified), and then with `crlf` (again, if
+specified and applicable).
+
+In the check-out codepath, the blob content is first converted
+with `crlf`, and then `ident`.
+
+
Generating diff text
~~~~~~~~~~~~~~~~~~~~