git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix two minor problems in the docs for git-config
@ 2012-08-18 17:32 mhagger
  2012-08-18 17:32 ` [PATCH 1/2] git-config.txt: properly escape quotation marks in example mhagger
  2012-08-18 17:32 ` [PATCH 2/2] git-config.txt: fix example mhagger
  0 siblings, 2 replies; 7+ messages in thread
From: mhagger @ 2012-08-18 17:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Michael Haggerty

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

This is just something I stumbled across.

Michael Haggerty (2):
  git-config.txt: properly escape quotation marks in example
  git-config.txt: fix example

 Documentation/git-config.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.7.11.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] git-config.txt: properly escape quotation marks in example
  2012-08-18 17:32 [PATCH 0/2] Fix two minor problems in the docs for git-config mhagger
@ 2012-08-18 17:32 ` mhagger
  2012-08-18 20:43   ` Junio C Hamano
  2012-08-18 17:32 ` [PATCH 2/2] git-config.txt: fix example mhagger
  1 sibling, 1 reply; 7+ messages in thread
From: mhagger @ 2012-08-18 17:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Michael Haggerty

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

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 <mhagger@alum.mit.edu>
---

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.

 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
-- 
1.7.11.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] git-config.txt: fix example
  2012-08-18 17:32 [PATCH 0/2] Fix two minor problems in the docs for git-config mhagger
  2012-08-18 17:32 ` [PATCH 1/2] git-config.txt: properly escape quotation marks in example mhagger
@ 2012-08-18 17:32 ` mhagger
  2012-08-18 20:45   ` Junio C Hamano
  1 sibling, 1 reply; 7+ messages in thread
From: mhagger @ 2012-08-18 17:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Michael Haggerty

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

The "--add" option is required to add a new value to a multivalued
configuration entry.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 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 46775fe..584ef51 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -342,7 +342,7 @@ To actually match only values with an exclamation mark, you have to
 To add a new proxy, without altering any of the existing ones, use
 
 ------------
-% git config core.gitproxy '"proxy-command" for example.com'
+% git config --add core.gitproxy '"proxy-command" for example.com'
 ------------
 
 An example to use customized color from the configuration in your
-- 
1.7.11.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] git-config.txt: properly escape quotation marks in example
  2012-08-18 17:32 ` [PATCH 1/2] git-config.txt: properly escape quotation marks in example mhagger
@ 2012-08-18 20:43   ` Junio C Hamano
  2012-08-18 23:39     ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2012-08-18 20:43 UTC (permalink / raw)
  To: mhagger; +Cc: git

mhagger@alum.mit.edu writes:

> From: Michael Haggerty <mhagger@alum.mit.edu>
>
> 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 <mhagger@alum.mit.edu>
> ---
>
> 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.

>  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] git-config.txt: fix example
  2012-08-18 17:32 ` [PATCH 2/2] git-config.txt: fix example mhagger
@ 2012-08-18 20:45   ` Junio C Hamano
  0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2012-08-18 20:45 UTC (permalink / raw)
  To: mhagger; +Cc: git

mhagger@alum.mit.edu writes:

>  To add a new proxy, without altering any of the existing ones, use
>  
>  ------------
> -% git config core.gitproxy '"proxy-command" for example.com'
> +% git config --add core.gitproxy '"proxy-command" for example.com'
>  ------------

Sensible; thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] git-config.txt: properly escape quotation marks in example
  2012-08-18 20:43   ` Junio C Hamano
@ 2012-08-18 23:39     ` Junio C Hamano
  2012-08-19  9:33       ` Michael Haggerty
  0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2012-08-18 23:39 UTC (permalink / raw)
  To: mhagger; +Cc: git

Junio C Hamano <gitster@pobox.com> writes:

>> 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 think the answer is "no", there is no way to specify anything
other than a "path to the command" for gitproxy.  So I think we
should do this instead:

-- >8 --
Subject: [PATCH] git-config doc: unconfuse an example

One fictitious command "proxy-command" is enclosed inside a double
quote pair, while another fictitious command "default-proxy" is not
in the example, but the quoting does not change anything in the pair
of examples.  Remove the quotes to avoid unnecessary confusion.

Noticed by Michael Haggerty.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 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 5382753..b24faa8 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -251,7 +251,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
-- 
1.7.12.rc3.96.g0dba3eb

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] git-config.txt: properly escape quotation marks in example
  2012-08-18 23:39     ` Junio C Hamano
@ 2012-08-19  9:33       ` Michael Haggerty
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Haggerty @ 2012-08-19  9:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 08/19/2012 01:39 AM, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>>> 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.
>> [...]
>
> I think the answer is "no", there is no way to specify anything
> other than a "path to the command" for gitproxy.  So I think we
> should do this instead:  [...]

ACK.  Thanks.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-08-19  9:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-18 17:32 [PATCH 0/2] Fix two minor problems in the docs for git-config mhagger
2012-08-18 17:32 ` [PATCH 1/2] git-config.txt: properly escape quotation marks in example mhagger
2012-08-18 20:43   ` Junio C Hamano
2012-08-18 23:39     ` Junio C Hamano
2012-08-19  9:33       ` Michael Haggerty
2012-08-18 17:32 ` [PATCH 2/2] git-config.txt: fix example mhagger
2012-08-18 20:45   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).