aboutsummaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-20 14:40:12 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-20 14:40:12 -0800
commit0877510ad4e8b951b08f9cbb25cfc0d994468979 (patch)
treedcfc43b1cf44ba49c3f9f206504d2f1cfee8bcc6 /Documentation/technical
parent15a873d6e85d8089117a6a2141c8158bd370cf49 (diff)
parent1a893064d7b403625896a2c8bdab39f0f7db61d5 (diff)
downloadgit-0877510ad4e8b951b08f9cbb25cfc0d994468979.tar.gz
git-0877510ad4e8b951b08f9cbb25cfc0d994468979.tar.xz
Merge branch 'jk/warn-author-committer-after-commit'
* jk/warn-author-committer-after-commit: user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere commit.c::print_summary: do not release the format string too early commit: allow suppression of implicit identity advice commit: show interesting ident information in summary strbuf: add strbuf_addbuf_percentquote strbuf_expand: convert "%%" to "%" Conflicts: builtin-commit.c ident.c
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/api-strbuf.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt
index a0e0f850f..afe275995 100644
--- a/Documentation/technical/api-strbuf.txt
+++ b/Documentation/technical/api-strbuf.txt
@@ -199,6 +199,10 @@ character if the letter `n` appears after a `%`. The function returns
the length of the placeholder recognized and `strbuf_expand()` skips
over it.
+
+The format `%%` is automatically expanded to a single `%` as a quoting
+mechanism; callers do not need to handle the `%` placeholder themselves,
+and the callback function will not be invoked for this placeholder.
++
All other characters (non-percent and not skipped ones) are copied
verbatim to the strbuf. If the callback returned zero, meaning that the
placeholder is unknown, then the percent sign is copied, too.
@@ -214,6 +218,13 @@ which can be used by the programmer of the callback as she sees fit.
placeholder and replacement string. The array needs to be
terminated by an entry with placeholder set to NULL.
+`strbuf_addbuf_percentquote`::
+
+ Append the contents of one strbuf to another, quoting any
+ percent signs ("%") into double-percents ("%%") in the
+ destination. This is useful for literal data to be fed to either
+ strbuf_expand or to the *printf family of functions.
+
`strbuf_addf`::
Add a formatted string to the buffer.