diff options
author | Jeff King <peff@peff.net> | 2011-08-03 20:13:29 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-04 15:49:13 -0700 |
commit | 5d2fc9135a35284176e99708b9b6f32c9e6eb7a2 (patch) | |
tree | 33f4b86622e56d19e4fe706b05e0c6e22a86f216 /Documentation/git-grep.txt | |
parent | 927cd1fc940f7b588521b388aeb610ab3890399e (diff) | |
download | git-5d2fc9135a35284176e99708b9b6f32c9e6eb7a2.tar.gz |
docs: put listed example commands in backticks
Many examples of git command invocation are given in asciidoc listing
blocks, which makes them monospaced and avoids further interpretation of
special characters. Some manpages make a list of examples, like:
git foo::
Run git foo.
git foo -q::
Use the "-q" option.
to quickly show many variants. However, they can sometimes be hard to
read, because they are shown in a proportional-width font (so, for
example, seeing the difference between "-- foo" and "--foo" can be
difficult).
This patch puts all such examples into backticks, which gives the
equivalent formatting to a listing block (i.e., monospaced and without
character interpretation).
As a bonus, this also fixes an example in the git-push manpage, in which
"git push origin :::" was accidentally considered a newly-indented list,
and not a list item with "git push origin :" in it.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r-- | Documentation/git-grep.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 07b3c6a086..062711139c 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -215,15 +215,15 @@ OPTIONS Examples -------- -git grep {apostrophe}time_t{apostrophe} \-- {apostrophe}*.[ch]{apostrophe}:: +`git grep {apostrophe}time_t{apostrophe} \-- {apostrophe}*.[ch]{apostrophe}`:: Looks for `time_t` in all tracked .c and .h files in the working directory and its subdirectories. -git grep -e {apostrophe}#define{apostrophe} --and \( -e MAX_PATH -e PATH_MAX \):: +`git grep -e {apostrophe}#define{apostrophe} --and \( -e MAX_PATH -e PATH_MAX \)`:: Looks for a line that has `#define` and either `MAX_PATH` or `PATH_MAX`. -git grep --all-match -e NODE -e Unexpected:: +`git grep --all-match -e NODE -e Unexpected`:: Looks for a line that has `NODE` or `Unexpected` in files that have lines that match both. |