git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] midx: fix a formatting issue in "multi-pack-index.txt"

From
Teng Long <dyroneteng@gmail.com>
Date
Nov 18, 2021, 03:39 UTC
Message-ID
<20211118033959.59881-1-dyroneteng@gmail.com>
In-Reply-To
<YZQngLFWlns9HyoW@nand.local>
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
"
Show 10 quoted lines
> 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

Previous: Taylor BlauNext: Teng Long
Message 4 of 8 in “midx: fix a formatting issue in "multi-pack-index.txt"”
  1. midx: fix a formatting issue in "multi-pack-index.txt"Teng Long, Nov 15, 2021
  2. Derrick StoleeNov 15, 2021
  3. Taylor BlauNov 16, 2021
  4. Teng LongNov 18, 2021
  5. 0/1 [PATCH] midx: fix a formatting issue in docsTeng Long, Nov 18, 2021
  6. 1/1 midx: fix a formatting issue in "multi-pack-index.txt"Teng Long, Nov 18, 2021
  7. Derrick StoleeNov 18, 2021
  8. Junio C HamanoNov 18, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.