git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] fetch doc: escape asterisk in --tags paragraph
@ 2013-06-07 11:31 Ramkumar Ramachandra
  2013-06-07 14:47 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Ramkumar Ramachandra @ 2013-06-07 11:31 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Git List

Currently, the paragraph corresponding to the --tags option in
git-fetch(1) looks like:

  -t, --tags
      This is a short-hand for giving "refs/tags/:refs/tags/" refspec
                                                 ^^^^^^^^^^^
						 this is in bold

This happens because the corresponding text in fetch-options.txt is
"refs/tags/*:refs/tags/*"; asciidoc renders the text between the two
asterisks in bold.  Escape the first asterisk, correcting the text.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Candidate for maint?

 Documentation/fetch-options.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 9cb6496..5f68149 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -61,7 +61,7 @@ endif::git-pull[]
 ifndef::git-pull[]
 -t::
 --tags::
-	This is a short-hand for giving "refs/tags/*:refs/tags/*"
+	This is a short-hand for giving "refs/tags/\*:refs/tags/*"
 	refspec from the command line, to ask all tags to be fetched
 	and stored locally.  Because this acts as an explicit
 	refspec, the default refspecs (configured with the
-- 
1.8.3.20.g7940bce.dirty

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

* Re: [PATCH] fetch doc: escape asterisk in --tags paragraph
  2013-06-07 11:31 [PATCH] fetch doc: escape asterisk in --tags paragraph Ramkumar Ramachandra
@ 2013-06-07 14:47 ` Junio C Hamano
  2013-06-07 15:09   ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-06-07 14:47 UTC (permalink / raw
  To: Ramkumar Ramachandra; +Cc: Git List

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> Currently, the paragraph corresponding to the --tags option in
> git-fetch(1) looks like:
>
>   -t, --tags
>       This is a short-hand for giving "refs/tags/:refs/tags/" refspec
>                                                  ^^^^^^^^^^^
> 						 this is in bold
>
> This happens because the corresponding text in fetch-options.txt is
> "refs/tags/*:refs/tags/*"; asciidoc renders the text between the two
> asterisks in bold.  Escape the first asterisk, correcting the text.
>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  Candidate for maint?

The issue certainly is real and needs a fix for maint.  Your
solution I am not sure about.

  $ git grep '\\\*' -- Documentation/\*.txt

shows only two meaningful hits (git-rm.txt and git-svn.txt);
everybody else uses

$ git grep '{asterisk}' -- Documentation/\*.txt

and the one you spotted in fetch-options.txt is very similar to the
one appears in git-pull.txt, I think.


>  Documentation/fetch-options.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
> index 9cb6496..5f68149 100644
> --- a/Documentation/fetch-options.txt
> +++ b/Documentation/fetch-options.txt
> @@ -61,7 +61,7 @@ endif::git-pull[]
>  ifndef::git-pull[]
>  -t::
>  --tags::
> -	This is a short-hand for giving "refs/tags/*:refs/tags/*"
> +	This is a short-hand for giving "refs/tags/\*:refs/tags/*"
>  	refspec from the command line, to ask all tags to be fetched
>  	and stored locally.  Because this acts as an explicit
>  	refspec, the default refspecs (configured with the

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

* Re: [PATCH] fetch doc: escape asterisk in --tags paragraph
  2013-06-07 14:47 ` Junio C Hamano
@ 2013-06-07 15:09   ` Junio C Hamano
  2013-06-07 15:13     ` Ramkumar Ramachandra
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-06-07 15:09 UTC (permalink / raw
  To: Ramkumar Ramachandra; +Cc: Git List

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

> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> Currently, the paragraph corresponding to the --tags option in
>> git-fetch(1) looks like:
>>
>>   -t, --tags
>>       This is a short-hand for giving "refs/tags/:refs/tags/" refspec
>>                                                  ^^^^^^^^^^^
>> 						 this is in bold
>>
>> This happens because the corresponding text in fetch-options.txt is
>> "refs/tags/*:refs/tags/*"; asciidoc renders the text between the two
>> asterisks in bold.  Escape the first asterisk, correcting the text.
>>
>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
>> ---
>>  Candidate for maint?
>
> The issue certainly is real and needs a fix for maint.  Your
> solution I am not sure about.
>
>   $ git grep '\\\*' -- Documentation/\*.txt
>
> shows only two meaningful hits (git-rm.txt and git-svn.txt);
> everybody else uses
>
> $ git grep '{asterisk}' -- Documentation/\*.txt
>
> and the one you spotted in fetch-options.txt is very similar to the
> one appears in git-pull.txt, I think.

How about this?

-- >8 --
Subject: fetch-options.txt: prevent wildcard refspec from getting misformatted 

When explaining the "--tags" option as an equivalent to giving an
explicit "refs/tags/*:refs/tags/*" refspec, the two asterisks were
misinterpreted by AsciiDoc as a request to typeset the string
segment between them in bold.

We could fix it in two ways.  We can replace them with {asterisk}s
while keeping the string as body text, or we can mark it as a
literal string by using the backquotes around it.

Let's do the latter, as it is teaching the user an "exactly as
typed" alternative.

Noticed-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/fetch-options.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 6e98bdf..c87bf39 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -57,7 +57,7 @@ endif::git-pull[]
 ifndef::git-pull[]
 -t::
 --tags::
-	This is a short-hand for giving "refs/tags/*:refs/tags/*"
+	This is a short-hand for giving `refs/tags/*:refs/tags/*`
 	refspec from the command line, to ask all tags to be fetched
 	and stored locally.  Because this acts as an explicit
 	refspec, the default refspecs (configured with the

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

* Re: [PATCH] fetch doc: escape asterisk in --tags paragraph
  2013-06-07 15:09   ` Junio C Hamano
@ 2013-06-07 15:13     ` Ramkumar Ramachandra
  0 siblings, 0 replies; 4+ messages in thread
From: Ramkumar Ramachandra @ 2013-06-07 15:13 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Git List

Junio C Hamano wrote:
> How about this?

Looks good, thanks.

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

end of thread, other threads:[~2013-06-07 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07 11:31 [PATCH] fetch doc: escape asterisk in --tags paragraph Ramkumar Ramachandra
2013-06-07 14:47 ` Junio C Hamano
2013-06-07 15:09   ` Junio C Hamano
2013-06-07 15:13     ` Ramkumar Ramachandra

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).