Skip to content

Commit

Permalink
Documentation: add missing quotes to "git grep" examples
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 20, 2010
1 parent 1b6c6cf commit 3988da0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-grep.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down

0 comments on commit 3988da0

Please sign in to comment.