summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2010-02-21 19:11:56 -0800
committerShawn O. Pearce <sop@google.com>2010-02-21 19:14:31 -0800
commitc99630a25dc5ac4ecad6b8d6b0bb03786fc9c336 (patch)
treefc15e7dd1ef51957decff4c288aa1442c6b2c30e
parentc20e283a46a2096e08313c8db20c70578a62cd97 (diff)
documentation: Improve bugzilla link example to include #
The expression "bug #123" is a common way to reference a bugzilla bug number, but we need to use "" around the # to escape it from the git config file parser. Show this in our bugzilla example. Bug: issue 454 Change-Id: I69429da510d62c93b6dd5b24dad36e111c4e7bc5 Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r--Documentation/config-gerrit.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 430fb86a35..051c728108 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -358,7 +358,7 @@ how the replacement is displayed to the user.
link = "#q,$1,n,z"
[commentlink "bugzilla"]
- match = (bug\\s+)(\\d+)
+ match = "(bug\\s+#?)(\\d+)"
link = http://bugs.example.com/show_bug.cgi?id=$2
[commentlink "tracker"]
@@ -373,8 +373,10 @@ with a hyperlink. Subexpressions of the matched string can be
stored using groups and accessed with `$'n'` syntax, where 'n'
is the group number, starting from 1.
+
-The configuration file parser eats one level of backslashes, so
-the character class `\s` requires `\\s` in the configuration file.
+The configuration file parser eats one level of backslashes, so the
+character class `\s` requires `\\s` in the configuration file. The
+parser also terminates the line at the first `#`, so a match
+expression containing # must be wrapped in double quotes.
+
A common pattern to match is `bug\\s+(\\d+)`.