Thread (22 messages) flat view 22 messages, 3 authors, 2016-06-15
STALE3732d

[PATCH 05/17] Documentation: add missing quotes to "git grep" examples

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:21
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

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 <redacted>
Cc: Mark Lodato <redacted>
Cc: Junio C Hamano <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
 Documentation/git-grep.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 5474dd7..dab0a78 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -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`.
 
-- 
1.7.2.2.536.g42dab.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help