All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] midx: fix a formatting issue in "multi-pack-index.txt"
@ 2021-11-15  6:33 Teng Long
  2021-11-15 16:25 ` Derrick Stolee
  2021-11-18  7:11 ` [PATCH v2 0/1] [PATCH] midx: fix a formatting issue in docs Teng Long
  0 siblings, 2 replies; 8+ messages in thread
From: Teng Long @ 2021-11-15  6:33 UTC (permalink / raw)
  To: git; +Cc: gitster, me, stolee, Teng Long

Signed-off-by: Teng Long <dyroneteng@gmail.com>
---
 Documentation/technical/multi-pack-index.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/technical/multi-pack-index.txt b/Documentation/technical/multi-pack-index.txt
index fb688976c4..6b2b48f4ef 100644
--- a/Documentation/technical/multi-pack-index.txt
+++ b/Documentation/technical/multi-pack-index.txt
@@ -20,8 +20,8 @@ and their offsets into multiple packfiles. It contains:
 - A list of packfile names.
 - A sorted list of object IDs.
 - A list of metadata for the ith object ID including:
-  - A value j referring to the jth packfile.
-  - An offset within the jth packfile for the object.
+  * A value j referring to the jth packfile.
+  * An offset within the jth packfile for the object.
 - If large offsets are required, we use another list of large
   offsets similar to version 2 pack-indexes.
 
-- 
2.33.1.dirty


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

* Re: [PATCH] midx: fix a formatting issue in "multi-pack-index.txt"
  2021-11-15  6:33 [PATCH] midx: fix a formatting issue in "multi-pack-index.txt" Teng Long
@ 2021-11-15 16:25 ` Derrick Stolee
  2021-11-16 21:49   ` Taylor Blau
  2021-11-18  7:11 ` [PATCH v2 0/1] [PATCH] midx: fix a formatting issue in docs Teng Long
  1 sibling, 1 reply; 8+ messages in thread
From: Derrick Stolee @ 2021-11-15 16:25 UTC (permalink / raw)
  To: Teng Long, git; +Cc: gitster, me

On 11/15/2021 1:33 AM, Teng Long wrote:
> Signed-off-by: Teng Long <dyroneteng@gmail.com>

Hi Teng,

Could you spend some time in your commit message explaining what
is wrong about the characters used for bullet points here?

> -  - A value j referring to the jth packfile.
> -  - An offset within the jth packfile for the object.
> +  * A value j referring to the jth packfile.
> +  * An offset within the jth packfile for the object.
>  - If large offsets are required, we use another list of large
>    offsets similar to version 2 pack-indexes.

Is it that the indentation isn't enough to show a sublist? I see
that the HTML rendering on git-scm.com [1] does fail to show this
sublist, and I could believe that this change would fix it (but I
am not sure).

[1] https://www.git-scm.com/docs/multi-pack-index

Thanks,
-Stolee

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

* Re: [PATCH] midx: fix a formatting issue in "multi-pack-index.txt"
  2021-11-15 16:25 ` Derrick Stolee
@ 2021-11-16 21:49   ` Taylor Blau
  2021-11-18  3:39     ` Teng Long
  0 siblings, 1 reply; 8+ messages in thread
From: Taylor Blau @ 2021-11-16 21:49 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: Teng Long, git, gitster

On Mon, Nov 15, 2021 at 11:25:56AM -0500, Derrick Stolee wrote:
> On 11/15/2021 1:33 AM, Teng Long wrote:
> > Signed-off-by: Teng Long <dyroneteng@gmail.com>
>
> Hi Teng,
>
> Could you spend some time in your commit message explaining what
> is wrong about the characters used for bullet points here?
>
> > -  - A value j referring to the jth packfile.
> > -  - An offset within the jth packfile for the object.
> > +  * A value j referring to the jth packfile.
> > +  * An offset within the jth packfile for the object.
> >  - If large offsets are required, we use another list of large
> >    offsets similar to version 2 pack-indexes.
>
> Is it that the indentation isn't enough to show a sublist?

That's it. ASCIIDoc doesn't treat an indented dash character as the
beginning of a sub-list. It will treat an indented asterisk as beginning
a sub-list, but only if the rest of the list items begin with a "-".

It might just be worth converting this whole thing to use what ASCIIDoc
would probably consider to be a more standard format, i.e.:

    * A list of packfile names.
    * A sorted list of object IDs.
    * A list of metadata for the ith object ID including:
    ** A value j referring to the jth packfile.
    ** An offset within the jth packfile for the object.
    * If large offsets are required, we use another list of large
      offsets similar to version 2 pack-indexes.

> I see that the HTML rendering on git-scm.com [1] does fail to show
> this sublist, and I could believe that this change would fix it (but I
> am not sure).
>
> [1] https://www.git-scm.com/docs/multi-pack-index

Yeah, Teng's fix works just fine. So I'd be happy to see that picked up
(with or without much additional explanation).

Thanks,
Taylor

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

* Re: [PATCH] midx: fix a formatting issue in "multi-pack-index.txt"
  2021-11-16 21:49   ` Taylor Blau
@ 2021-11-18  3:39     ` Teng Long
  0 siblings, 0 replies; 8+ messages in thread
From: Teng Long @ 2021-11-18  3:39 UTC (permalink / raw)
  To: me; +Cc: git, gitster, stolee, Teng Long


On Mon, Tue, 16 Nov 2021 16:49:52 -0500, Taylor Blau wrote:

> That's it. ASCIIDoc doesn't treat an indented dash character as the
> beginning of a sub-list.

That's right.

> It will treat an indented asterisk as beginning
> a sub-list, but only if the rest of the list items begin with a "-".

There are some questions here.
I think the indent is not needed for bulleted list in ASCIIDOC. If we
want to write a nested bulleted list, we could just use asterisks
without any dashes like:

"
* Level 1 list item
** Level 2 list item
*** Level 3 list item
** Level 2 list item
* Level 1 list item
** Level 2 list item
* Level 1 list item
"

And the dashes are suggested only be used as the marker for the first
level because the dash doesn’t work well or a best practice for nested
lists, like (dash is as level 2):

"
* Level 1 list item
- Level 2 list item
* Level 1 list item
"

But, if you are writting a non-nested bulleted lists, use dashes works
too, like:

"
- Level 1 list item
- Level 1 list item
- Level 1 list item
"

> It might just be worth converting this whole thing to use what ASCIIDoc
> would probably consider to be a more standard format, i.e.:
>
>     * A list of packfile names.
>     * A sorted list of object IDs.
>     * A list of metadata for the ith object ID including:
>     ** A value j referring to the jth packfile.
>     ** An offset within the jth packfile for the object.
>     * If large offsets are required, we use another list of large
>       offsets similar to version 2 pack-indexes.

I agree with you.

The asterisks are recommanded to use I think, it displays intuitively
when writting ASCIIDOC lists (marker length = nesting level).

> Yeah, Teng's fix works just fine. So I'd be happy to see that picked up
> (with or without much additional explanation).

I found it because I'm learning about the implements about the
multi-pack-index, reverse-index and multi-pack-bitmap, very nice
feature.

Patch v2 will add more descriptions (Derrick Stolee suggested) in
commit message and will make the replacements from dashes to asterisks.

Finally, thanks Derrick Stolee and Taylor Blau for the relies.

References:
[1] https://asciidoc-py.github.io/userguide.html#_bulleted_lists

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

* [PATCH v2 0/1] [PATCH] midx: fix a formatting issue in docs
  2021-11-15  6:33 [PATCH] midx: fix a formatting issue in "multi-pack-index.txt" Teng Long
  2021-11-15 16:25 ` Derrick Stolee
@ 2021-11-18  7:11 ` Teng Long
  2021-11-18  7:11   ` [PATCH v2 1/1] midx: fix a formatting issue in "multi-pack-index.txt" Teng Long
  1 sibling, 1 reply; 8+ messages in thread
From: Teng Long @ 2021-11-18  7:11 UTC (permalink / raw)
  To: git; +Cc: gitster, me, stolee, Teng Long

Patch 2 contains the changes from the advices from Derrick Stolee
and Taylor Blau:

    1. More introductions in commit message.
    2. Use asterisks instead of dashes in "multi-pack-index.txt".


Teng Long (1):
  midx: fix a formatting issue in "multi-pack-index.txt"

 Documentation/technical/multi-pack-index.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Range-diff against v1:
1:  a7dc1980a7 < -:  ---------- midx: fix a formatting issue in "multi-pack-index.txt"
-:  ---------- > 1:  9b910a44f4 midx: fix a formatting issue in "multi-pack-index.txt"
-- 
2.33.1.9.g5fbd2fc599.dirty


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

* [PATCH v2 1/1] midx: fix a formatting issue in "multi-pack-index.txt"
  2021-11-18  7:11 ` [PATCH v2 0/1] [PATCH] midx: fix a formatting issue in docs Teng Long
@ 2021-11-18  7:11   ` Teng Long
  2021-11-18 12:16     ` Derrick Stolee
  2021-11-18 23:51     ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Teng Long @ 2021-11-18  7:11 UTC (permalink / raw)
  To: git; +Cc: gitster, me, stolee, Teng Long

There is a formatting issue  in "multi-pack-index.html", corresponding
to the nesting bulleted list of a wrong usage in "multi-pack-index.txt"
and this commit fix the problem.

In ASCIIDOC, it doesn't treat an indented character as the
beginning of a sub-list. If we want to write a nested bulleted list, we
could just use ASTERISK without any DASH like:

      "
      * Level 1 list item
      ** Level 2 list item
      *** Level 3 list item
      ** Level 2 list item
      * Level 1 list item
      ** Level 2 list item
      * Level 1 list item
      "

The DASH can be used for bulleted list too, But the DASH is suggested
only to be used as the marker for the first level because the DASH
doesn’t work well or a best practice for nested lists,
like (dash is as level 2 below):

      "
      * Level 1 list item
      - Level 2 list item
      * Level 1 list item
      "

ASTERISK is recommanded to use because it works intuitively and clearly
("marker length = nesting level") in nested lists, but the DASH can't.
However, when you want to write a non-nested bulleted lists, DASH works
too, like:

      "
      - Level 1 list item
      - Level 1 list item
      - Level 1 list item
      "

Reviewed-by: Taylor Blau <me@ttaylorr.com>
Reviewed-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Teng Long <dyroneteng@gmail.com>
---
 Documentation/technical/multi-pack-index.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/technical/multi-pack-index.txt b/Documentation/technical/multi-pack-index.txt
index fb688976c4..642e2517f3 100644
--- a/Documentation/technical/multi-pack-index.txt
+++ b/Documentation/technical/multi-pack-index.txt
@@ -17,12 +17,12 @@ is not feasible due to storage space or excessive repack times.
 The multi-pack-index (MIDX for short) stores a list of objects
 and their offsets into multiple packfiles. It contains:
 
-- A list of packfile names.
-- A sorted list of object IDs.
-- A list of metadata for the ith object ID including:
-  - A value j referring to the jth packfile.
-  - An offset within the jth packfile for the object.
-- If large offsets are required, we use another list of large
+* A list of packfile names.
+* A sorted list of object IDs.
+* A list of metadata for the ith object ID including:
+** A value j referring to the jth packfile.
+** An offset within the jth packfile for the object.
+* If large offsets are required, we use another list of large
   offsets similar to version 2 pack-indexes.
 
 Thus, we can provide O(log N) lookup time for any number
-- 
2.33.1.9.g5fbd2fc599.dirty


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

* Re: [PATCH v2 1/1] midx: fix a formatting issue in "multi-pack-index.txt"
  2021-11-18  7:11   ` [PATCH v2 1/1] midx: fix a formatting issue in "multi-pack-index.txt" Teng Long
@ 2021-11-18 12:16     ` Derrick Stolee
  2021-11-18 23:51     ` Junio C Hamano
  1 sibling, 0 replies; 8+ messages in thread
From: Derrick Stolee @ 2021-11-18 12:16 UTC (permalink / raw)
  To: Teng Long, git; +Cc: gitster, me

On 11/18/2021 2:11 AM, Teng Long wrote:
> There is a formatting issue  in "multi-pack-index.html", corresponding
> to the nesting bulleted list of a wrong usage in "multi-pack-index.txt"
> and this commit fix the problem.

Thank you for the detailed message!

> -- A list of packfile names.
> -- A sorted list of object IDs.
> -- A list of metadata for the ith object ID including:
> -  - A value j referring to the jth packfile.
> -  - An offset within the jth packfile for the object.
> -- If large offsets are required, we use another list of large
> +* A list of packfile names.
> +* A sorted list of object IDs.
> +* A list of metadata for the ith object ID including:
> +** A value j referring to the jth packfile.
> +** An offset within the jth packfile for the object.
> +* If large offsets are required, we use another list of large
>    offsets similar to version 2 pack-indexes.

LGTM!

Thanks,
-Stolee

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

* Re: [PATCH v2 1/1] midx: fix a formatting issue in "multi-pack-index.txt"
  2021-11-18  7:11   ` [PATCH v2 1/1] midx: fix a formatting issue in "multi-pack-index.txt" Teng Long
  2021-11-18 12:16     ` Derrick Stolee
@ 2021-11-18 23:51     ` Junio C Hamano
  1 sibling, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2021-11-18 23:51 UTC (permalink / raw)
  To: Teng Long; +Cc: git, me, stolee

Teng Long <dyroneteng@gmail.com> writes:

> There is a formatting issue  in "multi-pack-index.html", corresponding
> to the nesting bulleted list of a wrong usage in "multi-pack-index.txt"
> and this commit fix the problem.

Thanks, will apply.


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

end of thread, other threads:[~2021-11-18 23:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15  6:33 [PATCH] midx: fix a formatting issue in "multi-pack-index.txt" Teng Long
2021-11-15 16:25 ` Derrick Stolee
2021-11-16 21:49   ` Taylor Blau
2021-11-18  3:39     ` Teng Long
2021-11-18  7:11 ` [PATCH v2 0/1] [PATCH] midx: fix a formatting issue in docs Teng Long
2021-11-18  7:11   ` [PATCH v2 1/1] midx: fix a formatting issue in "multi-pack-index.txt" Teng Long
2021-11-18 12:16     ` Derrick Stolee
2021-11-18 23:51     ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.