diff options
| author | Jean-Noël Avila <jn.avila@free.fr> | 2025-03-09 19:45:11 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-10 09:58:06 -0700 |
| commit | 227c4f33a0351d12b04660a9f03ca96dbab1310a (patch) | |
| tree | 7a6add1d76b6a53c5fc5fc8087496a3bbdd22250 /Documentation/MyFirstObjectWalk.adoc | |
| parent | 87a0bdbf0f72b7561f3cd50636eee33dcb7dbcc3 (diff) | |
| download | git-227c4f33a0351d12b04660a9f03ca96dbab1310a.tar.xz | |
doc: add a blank line around block delimiters
The documentation is using the historical mode for titles, which is a
setext-style (i.e., two-line) section title.
The issue with this mode is that starting block delimiters (e.g.,
`----`) can be confused with a section title when they are exactly the
same length as the preceding line. In the original documentation, this
is taken care of for English by the writer, but it is not the case for
translations where these delimiters are hidden. A translator can
generate a line that is exactly the same length as the following block
delimiter, which leads to this line being considered as a title.
To safeguard against this issue, add a blank line before and after
block delimiters where block is at root level, else add a "+" line
before block delimiters to link it to the preceding paragraph.
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/MyFirstObjectWalk.adoc')
| -rw-r--r-- | Documentation/MyFirstObjectWalk.adoc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc index d6e9dfdbbe..bfe8f5f561 100644 --- a/Documentation/MyFirstObjectWalk.adoc +++ b/Documentation/MyFirstObjectWalk.adoc @@ -287,6 +287,7 @@ static void final_rev_info_setup(struct rev_info *rev) ==== Instead of using the shorthand `add_head_to_pending()`, you could do something like this: + ---- struct setup_revision_opt opt; @@ -295,6 +296,7 @@ something like this: opt.revarg_opt = REVARG_COMMITTISH; setup_revisions(argc, argv, rev, &opt); ---- + Using a `setup_revision_opt` gives you finer control over your walk's starting point. ==== |
