Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-23 00:00:24 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-23 00:00:24 +0300
commit25f9326561292b45311c60879d9bc08618727973 (patch)
treed6ea2102ed47d0464154fa78c523a303c3fb3cef /Documentation
parentf5c73f69fd711f4814a2e8da78a0a2f4dbb46013 (diff)
parent96099726ddb00b45135964220ce56468ba9fe184 (diff)
Merge branch 'rs/pretty-describe'
"git log --format='...'" learned "%(describe)" placeholder. * rs/pretty-describe: archive: expand only a single %(describe) per archive pretty: document multiple %(describe) being inconsistent t4205: assert %(describe) test coverage pretty: add merge and exclude options to %(describe) pretty: add %(describe)
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitattributes.txt3
-rw-r--r--Documentation/pretty-formats.txt13
2 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index e84e104f93..0a60472bb5 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -1174,7 +1174,8 @@ 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.
+commit hash. However, only one `%(describe)` placeholder is expanded
+per archive to avoid denial-of-service attacks.
Packing objects
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 6b59e28d44..45133066e4 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -208,6 +208,19 @@ The placeholders are:
'%cs':: committer date, short format (`YYYY-MM-DD`)
'%d':: ref names, like the --decorate option of linkgit:git-log[1]
'%D':: ref names without the " (", ")" wrapping.
+'%(describe[:options])':: human-readable name, like
+ linkgit: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.
++
+** 'match=<pattern>': Only consider tags matching the given
+ `glob(7)` pattern, excluding the "refs/tags/" prefix.
+** 'exclude=<pattern>': Do not consider tags matching the given
+ `glob(7)` pattern, excluding the "refs/tags/" prefix.
+
'%S':: ref name given on the command line by which the commit was reached
(like `git log --source`), only works with `git log`
'%e':: encoding