Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/2] git-config.txt: properly escape quotation marks in example

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:30

mhagger@alum.mit.edu writes:
From: Michael Haggerty <redacted>

In the example line as written,

        gitproxy="proxy-command" for kernel.org

the quotation marks are eaten by the config-file parser.  From the
history, it looks like this example wanted to have quotation marks in
the actual configured value.  So quote them as required nowadays.

Signed-off-by: Michael Haggerty <redacted>
---

The bigger question is whether this example is improved by including
quotation marks, or whether they are just a distraction from the main
point.  I abstain.
Thanks for spelling that bigger question out.  Given that the
example is showing distinction between "X" vs "X for Y", I would say
quotation is a distraction.

If you spelled it as

	[core]
        	gitproxy = sh -c 'proxy-command' for kernel.org

does the do the right thing?  Or do we require the above to be
spelled as

	[core]
        	gitproxy = \"sh -c 'proxy-command'\" for kernel.org

to work correctly?  I suspect that the former would work, and in
that case, the quote around "proxy-command" in the documentation is
indeed a distraction, and removing it will not hurt the readers.
quoted hunk
 Documentation/git-config.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 2d6ef32..46775fe 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -267,7 +267,7 @@ Given a .git/config like this:
 
 	; Proxy settings
 	[core]
-		gitproxy="proxy-command" for kernel.org
+		gitproxy=\"proxy-command\" for kernel.org
 		gitproxy=default-proxy ; for all the rest
 
 you can set the filemode to true with
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help