threads / patch / 23894

patchMan page section reference should be in uppercase

Subject: [PATCH] Man page section reference should be in uppercase

## tl;dr

4 messages between May 25, 2010 and May 27, 2010. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Nazri Ramliy· May 25, 2010, 03:01 UTC · lore
From: nazri <ayiehere@gmail.com>

The advice given by git push when doing a non-fast-forward push refers to the section 'Note about fast-forwards' in the git-push(1) man page.

The section name should really be all in uppercase, as in 'NOTE ABOUT FAST-FORWARDS' because that is how it is shown by git push --help.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
---
 builtin/push.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to builtin/push.c +2 −2
diff --git a/builtin/push.c b/builtin/push.c
index f4358b9..0694200 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -130,8 +130,8 @@ static int push_with_options(struct transport *transport, int flags)
 
 	if (nonfastforward && advice_push_nonfastforward) {
 		fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
-				"Merge the remote changes before pushing again.  See the 'Note about\n"
-				"fast-forwards' section of 'git push --help' for details.\n");
+				"Merge the remote changes before pushing again.  See the 'NOTE ABOUT\n"
+				"FAST-FORWARDS' section of 'git push --help' for details.\n");
 	}
 
 	return 1;
-- 
1.7.1.rc1.21.gf3bd6
Dévai Tamás· May 25, 2010, 18:45 UTC · re: Nazri Ramliy · lore

Re: [PATCH] Man page section reference should be in uppercase

2010. 05. 25, kedd keltezéssel 11.01-kor Nazri Ramliy ezt írta:
Show 8 quoted lines
> From: nazri <ayiehere@gmail.com>
> 
> The advice given by git push when doing a non-fast-forward push refers
> to the section 'Note about fast-forwards' in the git-push(1) man page.
> 
> The section name should really be all in uppercase, as in 'NOTE ABOUT
> FAST-FORWARDS' because that is how it is shown by git push --help.
> 

I don't really agree with this, but it might be only my personal preference. Reasons:

The section title in the man page is "typeset" in a "different font" to be easily distinguishable from the surrounding text -- therefore it's all capital. On the other hand, changing the reference in the advice given by git-push to be all uppercase will give a needless emphasis on the referred section title. This is wrong IMHO, because the main point of the advice is not this reference, but the earlier sentences (i.e. the push was rejected).

Show 20 quoted lines
> Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
> ---
>  builtin/push.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/builtin/push.c b/builtin/push.c
> index f4358b9..0694200 100644
> --- a/builtin/push.c
> +++ b/builtin/push.c
> @@ -130,8 +130,8 @@ static int push_with_options(struct transport *transport, int flags)
>  
>  	if (nonfastforward && advice_push_nonfastforward) {
>  		fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
> -				"Merge the remote changes before pushing again.  See the 'Note about\n"
> -				"fast-forwards' section of 'git push --help' for details.\n");
> +				"Merge the remote changes before pushing again.  See the 'NOTE ABOUT\n"
> +				"FAST-FORWARDS' section of 'git push --help' for details.\n");
>  	}
>  
>  	return 1;
Nazri Ramliy· May 26, 2010, 08:33 UTC · lore

Fwd: [PATCH] Man page section reference should be in uppercase

I forgot to reply to the list as well when sending the (now forwarded) message below.

Apparently only Dévai Tamás received it, and replied to me:
Dévai Tamás wrote to me:
> I didn't know that. Thanks for pointing out.
Apology for the top-posting-ish nature of this email.

I guess when forwarding an email verbatim, it's ok to top post it with a header of some sort?

nazri.
---------- Forwarded message ----------
From: Nazri Ramliy <ayiehere@gmail.com>
Date: Wed, May 26, 2010 at 9:52 AM
Subject: Re: [PATCH] Man page section reference should be in uppercase
To: Dévai Tamás <devait@vnet.hu>
On Wed, May 26, 2010 at 2:45 AM, Dévai Tamás <devait@vnet.hu> wrote:
Show 10 quoted lines
> I don't really agree with this, but it might be only my personal
> preference. Reasons:
>
> The section title in the man page is "typeset" in a "different font" to
> be easily distinguishable from the surrounding text -- therefore it's
> all capital. On the other hand, changing the reference in the advice
> given by git-push to be all uppercase will give a needless emphasis on
> the referred section title. This is wrong IMHO, because the main point
> of the advice is not this reference, but the earlier sentences (i.e. the
> push was rejected).

Keeping the reference to be in lowercase goes against what is currently practiced the man pages of git commands.  Have a look at the output of

       $ git grep '"[A-z ]\+" section'
See how all of them use all-caps when referring to man page sections.

If the user is already familiar with the non-fast-forward push issue, they would know how to proceed and ignored the 'needless' emphasis.

But for a user who is clueless about the non-fast-forward push issue the emphasis is good and even more important than that is that it is spelled out in the same exact form as how it will be rendered when the user run 'git push --help', IMHO.

nazri.
Junio C Hamano· May 27, 2010, 19:50 UTC · re: Nazri Ramliy · lore

Re: Fwd: [PATCH] Man page section reference should be in uppercase

Nazri Ramliy <ayiehere@gmail.com> writes:
>        $ git grep '"[A-z ]\+" section'
>
> See how all of them use all-caps when referring to man page sections.

"TEMPLATE DIRECTORY" and "SPECIFYING REVISIONS" are shown quite often, but there are some others that deviate from your "all caps" norm. For example, 'see the "Configuration Mechanism" section' appears in git.txt and it matches how the section header that is referred to is spelled.

Also the section headers referred to in caps in the current documentation set are indeed spelled in caps (grep for "TEMPLATE DIRECTORY" in Documentation/git-init.txt for example).

Having said that, I wouldn't mind if the theme of your improvement were to spell manual section *headers* in caps, instead of leaving the actual section names still spelled as "Note about fast-forwards" and upcasing only the reference(s) to it, which can make things inconsistent depending on how the documentation is typeset (e.g. I read the documentation source as text files). Obviously the resulting patchset may also have to upcase e.g. "combined diff format" section header to bring consistency into the whole documentation set, not just the "Note about fast-forwards" section.

← back to recent threads