git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Firmin Martin <firminmartin24@gmail.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH][GSoC] user-manual.txt: fix empty heading of introduction
Date: Sat, 03 Apr 2021 17:46:45 -0700	[thread overview]
Message-ID: <xmqq5z1227wq.fsf@gitster.g> (raw)
In-Reply-To: 7530f132-cd72-bb6f-21f1-1ee23ca5e20f@gmail.com

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> On 03/04/21 04.22, Junio C Hamano wrote:
>> I would have expected to see "before and after".  Is it too obvious
>> what the postimage would be?  Otherwise, a better presentation would
>> be to show (an excerpt from) diff between preimage and postimage
>> output.
>> Thanks.
>> 
> Attached is `diff -u` of generated HTML output, before and after this
> patch. The HTML is generated using Asciidoctor.

Unfortunately, that is more-or-less unreadable gunk.  Even for the
first few places that have differences, the output of diff between
raw HTML is not suited to spot that the first entry in the TOC has
changed classs from preface to chapter or how they are treated
differently.

What I did before sending out the message was to generate HTML for
the before and after versions, render them into text and then run
diff on them.  It showed that most changes are the chapter numbering
and cross reference, of course.  This was still hard to see, but at
least it was possible to eyeball what was going on [*].

While Firmin showed only the "before" version of .xml, a diff
between before-and-after versions of .xml turned out to be far
easier to see how the change propagates down the toolchain than
either of the above two.  It would have been  the best to have that,
instead of just the "before" image, in the explanation.

    --- user-manual.xml	2021-04-03 17:36:14.804344928 -0700
    +++ user-manual.xml	2021-04-03 17:36:44.599025868 -0700
    @@ -7,8 +7,8 @@
     <bookinfo>
         <title>Git User Manual</title>
     </bookinfo>
    -<preface>
    -<title></title>
    +<chapter id="introduction">
    +<title>Introduction</title>
     <simpara>Git is a fast distributed revision control system.</simpara>
     <simpara>This manual is designed to be readable by someone with basic UNIX
     command-line skills, but no previous knowledge of Git.</simpara>
    @@ -31,7 +31,7 @@
     without any explanation.</simpara>
     <simpara>Finally, see <xref linkend="todo"/> for ways that you can help make this manual more
     complete.</simpara>
    -</preface>
    +</chapter>
     <chapter id="repositories-and-branches">
     <title>Repositories and Branches</title>
     <section id="how-to-get-a-git-repository">

If an updated version is planned, I'd expect it to come with
something like the above indented patch plus a brief explanation of
side effects (i.e. we lost preface and we have renumbered the
chapters) in its proposed log message.

Thanks.


[Footnote]

* The text-rendered HTML would compare like this (just an excerpt).

--- /var/tmp/before.txt	2021-04-03 17:40:07.777307995 -0700
+++ /var/tmp/after.txt	2021-04-03 17:39:51.423836495 -0700
@@ -4,255 +4,259 @@
 
    Table of Contents
 
-   [1]1. Repositories and Branches
+   [1]1. Introduction
 
-   [2]How to get a Git repository
+   [2]2. Repositories and Branches
 

...

TOC numbering is of course off by one, as the patch promotes the
preface into the first chapter.

...

-   [114]B. Notes and todo list for this manual
+   [116]Todo list
 
-   [115]Todo list
+                            Chapter 1. Introduction
 
...

And of course, we now have the chapter title.

...

    Git is a fast distributed revision control system.
 
    This manual is designed to be readable by someone with basic UNIX
    command-line skills, but no previous knowledge of Git.
 
-   [116]Chapter 1, Repositories and Branches and [117]Chapter 2, Exploring
+   [117]Chapter 2, Repositories and Branches and [118]Chapter 3, Exploring

...

Cross references are all off-by-one, too.

  reply	other threads:[~2021-04-04  0:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 12:13 [PATCH][GSoC] user-manual.txt: fix empty heading of introduction Firmin Martin
2021-04-02 21:22 ` Junio C Hamano
2021-04-02 21:29   ` Junio C Hamano
2021-04-02 22:23     ` Junio C Hamano
2021-04-03  5:16   ` Bagas Sanjaya
2021-04-04  0:46     ` Junio C Hamano [this message]
2021-04-04  4:07 ` [PATCH v2 0/1] user-manual.txt: assign preface an id and a title Firmin Martin
2021-04-04  4:07   ` [PATCH v2 1/1] " Firmin Martin
2021-04-04  6:21     ` Junio C Hamano
2021-04-04  4:31   ` [PATCH v2 0/1] " Firmin Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq5z1227wq.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=bagasdotme@gmail.com \
    --cc=firminmartin24@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).