Skip to content

Commit

Permalink
attribute documentation: keep EXAMPLE at end
Browse files Browse the repository at this point in the history
The document gives overall definition of states in DESCRIPTION, describes
various aspects of git operations that can be influenced in EFFECTS, and
finally gives examples in the EXAMPLE section.  Archive creation however
was somehow documented after the EXAMPLE section, not insode EFFECTS.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jul 6, 2008
1 parent 984c6e7 commit 8a33dd8
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions Documentation/gitattributes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,23 @@ String::
variable.


Creating an archive
~~~~~~~~~~~~~~~~~~~

`export-subst`
^^^^^^^^^^^^^^

If the attribute `export-subst` is set for a file then git will expand
several placeholders when adding this file to an archive. The
expansion depends on the availability of a commit ID, i.e. if
linkgit:git-archive[1] has been given a tree instead of a commit or a
tag then no replacement will be done. The placeholders are the same
as those for the option `--pretty=format:` of linkgit:git-log[1],
except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
in the file. E.g. the string `$Format:%H$` will be replaced by the
commit hash.


EXAMPLE
-------

Expand Down Expand Up @@ -499,22 +516,6 @@ frotz unspecified
----------------------------------------------------------------


Creating an archive
~~~~~~~~~~~~~~~~~~~

`export-subst`
^^^^^^^^^^^^^^

If the attribute `export-subst` is set for a file then git will expand
several placeholders when adding this file to an archive. The
expansion depends on the availability of a commit ID, i.e. if
linkgit:git-archive[1] has been given a tree instead of a commit or a
tag then no replacement will be done. The placeholders are the same
as those for the option `--pretty=format:` of linkgit:git-log[1],
except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
in the file. E.g. the string `$Format:%H$` will be replaced by the
commit hash.


GIT
---
Expand Down

0 comments on commit 8a33dd8

Please sign in to comment.