1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-13 07:16:10 +02:00

Documentation: add missing quotes to "git grep" examples

Without an indication to the contrary, Asciidoc puts 'quoted
text' in italics, making the output look like this:

	git grep time_t -- *.[ch]
	    Looks for time_t in all tracked .c and .h
	    files in the working directory and its subdirectories.

	git grep -e '#define\' --and \( -e MAX_PATH -e PATH_MAX \)
	    Looks for a line that has #define and either MAX_PATH or
	    PATH_MAX.

In the first example, the *.[ch] argument needs to be protected from
the shell, or else it will only match files in the current directory.
The second example has a stray backslash.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
Cc: Mark Lodato <lodatom@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jonathan Nieder 2010-08-20 05:28:53 -05:00 committed by Junio C Hamano
parent 1b6c6cf006
commit 3988da0636

View File

@ -191,11 +191,11 @@ OPTIONS
Examples
--------
git grep 'time_t' \-- '*.[ch]'::
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 \'#define\' --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`.