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>
This commit is contained in:
@@ -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
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user