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

Re: [PATCH 1/2] doc: git-checkout: trivial callout cleanup

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 19, 2023, 19:37 UTC
Message-ID
<xmqq8ren8xz1.fsf@gitster.g>
In-Reply-To
<20230418070048.2209469-2-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 7 quoted lines
> The callouts are directly tied to the listing above, remove spaces to
> make it clear they are one and the same.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  Documentation/git-checkout.txt | 4 ----
>  1 file changed, 4 deletions(-)

I tried to format git-checkout.1 and git-checkout.html from HEAD and HEAD^ after applying this step, with asciidoc and asciidoctor, and did not see any difference that came from this patch. Am I correct to understand that this patch is done purely for the benefit of human readers, and not for formatting machinery?

It may be subjective for those who read the source if it is easier to read with or without inter-paragraph spaces, but in any case, the resulting source material now look the same way between two hunks, and consistency is good.

Queued.  Thanks.
Show 27 quoted lines
> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
> index 6bb32ab460..8ddeec63dd 100644
> --- a/Documentation/git-checkout.txt
> +++ b/Documentation/git-checkout.txt
> @@ -483,14 +483,11 @@ $ git checkout -b foo  # or "git switch -c foo"  <1>
>  $ git branch foo                                 <2>
>  $ git tag foo                                    <3>
>  ------------
> -
>  <1> creates a new branch `foo`, which refers to commit `f`, and then
>      updates `HEAD` to refer to branch `foo`. In other words, we'll no longer
>      be in detached `HEAD` state after this command.
> -
>  <2> similarly creates a new branch `foo`, which refers to commit `f`,
>      but leaves `HEAD` detached.
> -
>  <3> creates a new tag `foo`, which refers to commit `f`,
>      leaving `HEAD` detached.
>  
> @@ -529,7 +526,6 @@ $ git checkout master~2 Makefile  <2>
>  $ rm -f hello.c
>  $ git checkout hello.c            <3>
>  ------------
> -+
>  <1> switch branch
>  <2> take a file out of another commit
>  <3> restore `hello.c` from the index
Previous: Felipe ContrerasNext: Felipe Contreras
Message 3 of 15 in “doc: git-checkout: trivial style improvements”
  1. 0/2 doc: git-checkout: trivial style improvementsFelipe Contreras, Apr 18, 2023
  2. 1/2 doc: git-checkout: trivial callout cleanupFelipe Contreras, Apr 18, 2023
  3. Junio C HamanoApr 19, 2023
  4. Felipe ContrerasApr 24, 2023
  5. Junio C HamanoApr 25, 2023
  6. Jeff KingApr 25, 2023
  7. Felipe ContrerasApr 27, 2023
  8. Jeff KingMay 2, 2023
  9. Felipe ContrerasMay 2, 2023
  10. Junio C HamanoMay 3, 2023
  11. Felipe ContrerasMay 3, 2023
  12. Junio C HamanoMay 3, 2023
  13. Felipe ContrerasApr 27, 2023
  14. 2/2 doc: git-checkout: reorganize examplesFelipe Contreras, Apr 18, 2023
  15. Junio C HamanoApr 19, 2023

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.