git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header
@ 2017-02-28  8:59 Patrick Steinhardt
  2017-02-28  8:59 ` [PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers Patrick Steinhardt
  2017-02-28 17:32 ` [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Steinhardt @ 2017-02-28  8:59 UTC (permalink / raw)
  To: git; +Cc: Patrick Steinhardt, Patrick Steinhardt

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 Documentation/gitdiffcore.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt
index 46bc6d077..cf009a187 100644
--- a/Documentation/gitdiffcore.txt
+++ b/Documentation/gitdiffcore.txt
@@ -119,7 +119,7 @@ the original is used), and can be customized by giving a number
 after "-B" option (e.g. "-B75" to tell it to use 75%).
 
 
-diffcore-rename: For Detection Renames and Copies
+diffcore-rename: For Detecting Renames and Copies
 -------------------------------------------------
 
 This transformation is used to detect renames and copies, and is
-- 
2.12.0


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

* [PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers
  2017-02-28  8:59 [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header Patrick Steinhardt
@ 2017-02-28  8:59 ` Patrick Steinhardt
  2017-02-28 12:37   ` Jeff King
  2017-02-28 17:32 ` [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header Junio C Hamano
  1 sibling, 1 reply; 4+ messages in thread
From: Patrick Steinhardt @ 2017-02-28  8:59 UTC (permalink / raw)
  To: git; +Cc: Patrick Steinhardt, Patrick Steinhardt

The gitdiffcore documentation quotes the term "Complete Rewrites" in
headers for no real gain. This would make sense if the term could be
easily confused if not properly grouped together. But actually, the term
is quite obvious and thus does not really need any quoting, especially
regarding that it is not used anywhere else.

But more importanly, this brings up a bug when rendering man pages: when
trying to render quotes inside of a section header, we end up with
quotes which have been misaligned to the end of line. E.g.

    diffcore-break: For Splitting Up Complete Rewrites
    --------------------------------------------------

renders as

    DIFFCORE-BREAK: FOR SPLITTING UP  COMPLETE REWRITES""

, which is obviously wrong. While this is fixable for the man pages by
using double-quotes (e.g. ""COMPLETE REWRITES""), this again breaks it
for our generated HTML pages.

So fix the issue by simply dropping quotes inside of section headers,
which is currently only done for the term "Complete Rewrites".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---

The obvious other route here would be to fix how the stylesheets
handle quoting inside of these headers. But after taking a short
look, I didn't really get how our stylesheets actually stitch
together and as such bailed from doing so.

 Documentation/gitdiffcore.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt
index cf009a187..c0a60f315 100644
--- a/Documentation/gitdiffcore.txt
+++ b/Documentation/gitdiffcore.txt
@@ -84,8 +84,8 @@ format sections of the manual for 'git diff-{asterisk}' commands) or
 diff-patch format.
 
 
-diffcore-break: For Splitting Up "Complete Rewrites"
-----------------------------------------------------
+diffcore-break: For Splitting Up Complete Rewrites
+--------------------------------------------------
 
 The second transformation in the chain is diffcore-break, and is
 controlled by the -B option to the 'git diff-{asterisk}' commands.  This is
@@ -177,8 +177,8 @@ the expense of making it slower.  Without `--find-copies-harder`,
 copied happened to have been modified in the same changeset.
 
 
-diffcore-merge-broken: For Putting "Complete Rewrites" Back Together
---------------------------------------------------------------------
+diffcore-merge-broken: For Putting Complete Rewrites Back Together
+------------------------------------------------------------------
 
 This transformation is used to merge filepairs broken by
 diffcore-break, and not transformed into rename/copy by
-- 
2.12.0


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

* Re: [PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers
  2017-02-28  8:59 ` [PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers Patrick Steinhardt
@ 2017-02-28 12:37   ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2017-02-28 12:37 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: git, Patrick Steinhardt

On Tue, Feb 28, 2017 at 09:59:05AM +0100, Patrick Steinhardt wrote:

> The gitdiffcore documentation quotes the term "Complete Rewrites" in
> headers for no real gain. This would make sense if the term could be
> easily confused if not properly grouped together. But actually, the term
> is quite obvious and thus does not really need any quoting, especially
> regarding that it is not used anywhere else.
> 
> But more importanly, this brings up a bug when rendering man pages: when
> trying to render quotes inside of a section header, we end up with
> quotes which have been misaligned to the end of line. E.g.
> 
>     diffcore-break: For Splitting Up Complete Rewrites
>     --------------------------------------------------
> 
> renders as
> 
>     DIFFCORE-BREAK: FOR SPLITTING UP  COMPLETE REWRITES""
> 
> , which is obviously wrong. While this is fixable for the man pages by
> using double-quotes (e.g. ""COMPLETE REWRITES""), this again breaks it
> for our generated HTML pages.
> 
> So fix the issue by simply dropping quotes inside of section headers,
> which is currently only done for the term "Complete Rewrites".

Thanks for a nice explanation of the issue. I was curious whether
asciidoctor gets this right. It does, though I suppose that's because we
only look at the HTML output. It sounds like the issue is in the
docbook->roff path.

At any rate, I agree with your analysis. It's not worth futzing with the
formatting when it reads just as well without the quotes.

-Peff

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

* Re: [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header
  2017-02-28  8:59 [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header Patrick Steinhardt
  2017-02-28  8:59 ` [PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers Patrick Steinhardt
@ 2017-02-28 17:32 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2017-02-28 17:32 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: git, Patrick Steinhardt

Patrick Steinhardt <patrick.steinhardt@elego.de> writes:

> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  Documentation/gitdiffcore.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt
> index 46bc6d077..cf009a187 100644
> --- a/Documentation/gitdiffcore.txt
> +++ b/Documentation/gitdiffcore.txt
> @@ -119,7 +119,7 @@ the original is used), and can be customized by giving a number
>  after "-B" option (e.g. "-B75" to tell it to use 75%).
>  
>  
> -diffcore-rename: For Detection Renames and Copies
> +diffcore-rename: For Detecting Renames and Copies
>  -------------------------------------------------
>  
>  This transformation is used to detect renames and copies, and is

Thanks for carefully reading.  Both looks reasonable.

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

end of thread, other threads:[~2017-02-28 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28  8:59 [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header Patrick Steinhardt
2017-02-28  8:59 ` [PATCH 2/2] docs/diffcore: unquote "Complete Rewrites" in headers Patrick Steinhardt
2017-02-28 12:37   ` Jeff King
2017-02-28 17:32 ` [PATCH 1/2] docs/diffcore: fix grammar in diffcore-rename header Junio C Hamano

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).