archive: specfile support (--pretty=format: in archive files)
[gitweb.git] / Documentation / gitattributes.txt
index 46f9d591aa7a3af2235d29308d101b2bfa0bff56..47a621b7333bd171225ca78482c6da52c577777b 100644 (file)
@@ -421,6 +421,20 @@ frotz      unspecified
 ----------------------------------------------------------------
 
 
+Creating an archive
+~~~~~~~~~~~~~~~~~~~
+
+`specfile`
+^^^^^^^^^^
+
+If the attribute `specfile` 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
+gitlink: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 gitlink:git-log[1].
+
+
 GIT
 ---
 Part of the gitlink:git[7] suite