The gitattributes
man page says:
Creating an archive
export-subst
If the attributeexport-subst
is set for a file then Git will expand several placeholders when adding this file to an archive. [...] The placeholders are the same as those for the option--pretty=format:
of 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. However, only one%(describe)
placeholder is expanded per archive to avoid denial-of-service attacks.
The git log
man page says:
PRETTY FORMATS
[...]
format:<format-string>
[...]
The placeholders are:
[...]
Placeholders that expand to information extracted from the commit:
[...]
%(describe[:options])
human-readable name, like git-describe(1); empty string for undescribable commits. The describe string may be followed by a colon and zero or more comma-separated options. Descriptions can be inconsistent when tags are added or removed at the same time.
In the event that I forgot to tag a recent commit and git describe
has to resort to scanning trillions of past commits to find the most recent tag... I can just ^C to terminate git archive
. So whose service is being denied in this so called "denial-of-service".