From 438ded457b6e0d1e615edd593faeeafdc8818fea Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 20 Aug 2010 05:21:53 -0500 Subject: Documentation: quoting trouble in "git rm" discussion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current output (with Asciidoc 8.5.2) seems a bit broken: given two directories ‘d` and d2, there is a difference between using git rm 'd*’ and ‘git rm 'd/\*\’`, as the former will also remove all of directory d2. In other words, the markup parses as given two directories << d` and _d2_, there is a difference between using _git rm 'd* >>_ and << git rm 'd/\*\ >> `. I suspect there is an asciidoc bug involved (why is ' a candidate closing-quote mark when it is preceded by a backslash?) but with all the meanings of ` and ' involved I do not want to track it down. Better to use unambiguous {asterisk} and {apostrophe} entities. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-rm.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation/git-rm.txt') diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt index c21d19e573..d146751caa 100644 --- a/Documentation/git-rm.txt +++ b/Documentation/git-rm.txt @@ -78,7 +78,8 @@ a file that you have not told git about does not remove that file. File globbing matches across directory boundaries. Thus, given two directories `d` and `d2`, there is a difference between -using `git rm \'d\*\'` and `git rm \'d/\*\'`, as the former will +using `git rm {apostrophe}d{asterisk}{apostrophe}` and +`git rm {apostrophe}d/{asterisk}{apostrophe}`, as the former will also remove all of directory `d2`. REMOVING FILES THAT HAVE DISAPPEARED FROM THE FILESYSTEM -- cgit v1.2.3 From c300578f12ec23ba22f16af16259650e38e88f87 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 20 Aug 2010 05:30:24 -0500 Subject: Documentation: clarify quoting in "git rm" example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Intended output: git rm Documentation/\*.txt Removes all *.txt files from the index that are under the Documentation directory and any of its subdirectories. Note that the asterisk * is quoted from the shell in this example; this lets git, and not the shell, expand the pathnames of files and subdirectories under the Documentation/ directory. Without this change, there are too many backslashes output. Tested with asciidoc 8.5.2. Reported-by: Frédéric Brière Cc: Carl Worth Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-rm.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-rm.txt') diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt index d146751caa..71e3d9fc23 100644 --- a/Documentation/git-rm.txt +++ b/Documentation/git-rm.txt @@ -136,11 +136,11 @@ git diff --name-only --diff-filter=D -z | xargs -0 git rm --cached EXAMPLES -------- -git rm Documentation/\\*.txt:: - Removes all `\*.txt` files from the index that are under the +git rm Documentation/\*.txt:: + Removes all `*.txt` files from the index that are under the `Documentation` directory and any of its subdirectories. + -Note that the asterisk `\*` is quoted from the shell in this +Note that the asterisk `*` is quoted from the shell in this example; this lets git, and not the shell, expand the pathnames of files and subdirectories under the `Documentation/` directory. -- cgit v1.2.3