Skip to content

Commit

Permalink
Documentation: clarify quoting in gitignore docs
Browse files Browse the repository at this point in the history
An asterisk in "Documentation/*.txt" quoted with \ to avoid bold text
is being output as \* because asciidoc does not consider it a
candidate for escaping (there is no matching * to pair it with).

So the manual looks like it is saying that one should write
"Documentation/\*.txt" in the .gitignore file.

Reported-by: Frédéric Brière <fbriere@fbriere.net>
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 c300578 commit 9257a1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/gitignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ Patterns have the following format:
- Otherwise, git treats the pattern as a shell glob suitable
for consumption by fnmatch(3) with the FNM_PATHNAME flag:
wildcards in the pattern will not match a / in the pathname.
For example, "Documentation/\*.html" matches
For example, "Documentation/{asterisk}.html" matches
"Documentation/git.html" but not "Documentation/ppc/ppc.html"
or "tools/perf/Documentation/perf.html".

- A leading slash matches the beginning of the pathname.
For example, "/*.c" matches "cat-file.c" but not
For example, "/{asterisk}.c" matches "cat-file.c" but not
"mozilla-sha1/sha1.c".

An example:
Expand Down

0 comments on commit 9257a1e

Please sign in to comment.