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

Re: [PATCH 3/3] doc: notes: unify configuration variables definitions

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 14, 2022, 19:45 UTC
Message-ID
<xmqqzghb4gwg.fsf@gitster.g>
In-Reply-To
<d39e826756e79ce7fe270175ad0d5ae523528af9.1657819649.git.matheus.bernardino@usp.br>
Matheus Tavares <matheus.bernardino@usp.br> writes:
Show 6 quoted lines
>  	`cat_sort_uniq`.  Defaults to `manual`.  See "NOTES MERGE STRATEGIES"
> -	section of linkgit:git-notes[1] for more information on each strategy.
> +	section
> +ifdef::git-notes[above]
> +ifndef::git-notes[of linkgit:git-notes[1]]
> +	for more information on each strategy.

This is the first use of the single line ifdef/ifndef in our Documentation. I assume you have verified the rendered output on both AsciiDoc and AsciiDoctor?

Show 6 quoted lines
> -	"notes.mergeStrategy".  See the "NOTES MERGE STRATEGIES" section in
> -	linkgit:git-notes[1] for more information on the available strategies.
> +	"notes.mergeStrategy".  See the "NOTES MERGE STRATEGIES" section
> +ifdef::git-notes[above]
> +ifndef::git-notes[in linkgit:git-notes[1]]
> +	for more information on the available strategies.
Ditto.
Show 23 quoted lines
>  notes.displayRef::
> -	The (fully qualified) refname from which to show notes when
> -	showing commit messages.  The value of this variable can be set
> -	to a glob, in which case notes from all matching refs will be
> -	shown.  You may also specify this configuration variable
> -	several times.  A warning will be issued for refs that do not
> -	exist, but a glob that does not match any refs is silently
> -	ignored.
> -+
> -This setting can be overridden with the `GIT_NOTES_DISPLAY_REF`
> -environment variable, which must be a colon separated list of refs or
> -globs.
> -+
> -The effective value of "core.notesRef" (possibly overridden by
> -GIT_NOTES_REF) is also implicitly added to the list of refs to be
> -displayed.
> +	Which ref (or refs, if a glob or specified more than once), in
> +	addition to the default set by `core.notesRef` or
> +	`GIT_NOTES_REF`, to read notes from when showing commit
> +	messages with the 'git log' family of commands.
> +	This setting can be overridden on the command line or by the
> +	`GIT_NOTES_DISPLAY_REF` environment variable.
> +	See linkgit:git-log[1].

This is unrelated to the "unify description in git-foo.txt and config/foo.txt in the documentation" topic, isn't it?

I haven't formed an opinion on the updated text, and it makes it harder to review when the content change is mixed in the "unify description in two places" topic, so I won't comment on the change of the contents. Please split them into two steps (a step with only content change, and then another step to remove the duplicated one by making one include the other). Same comment applies to [2/3].

Show 12 quoted lines
>  notes.rewrite.<command>::
>  	When rewriting commits with <command> (currently `amend` or
> -	`rebase`) and this variable is set to `true`, Git
> -	automatically copies your notes from the original to the
> -	rewritten commit.  Defaults to `true`, but see
> -	"notes.rewriteRef" below.
> +	`rebase`), if this variable is `false`, git will not copy
> +	notes from the original to the rewritten commit.  Defaults to
> +	`true`.  See also "`notes.rewriteRef`" below.
> ++
> +This setting can be overridden by the `GIT_NOTES_REWRITE_REF`
> +environment variable.
Ditto.
Show 13 quoted lines
>  notes.rewriteMode::
> -	When copying notes during a rewrite (see the
> -	"notes.rewrite.<command>" option), determines what to do if
> -	the target commit already has a note.  Must be one of
> -	`overwrite`, `concatenate`, `cat_sort_uniq`, or `ignore`.
> -	Defaults to `concatenate`.
> +	When copying notes during a rewrite, what to do if the target
> +	commit already has a note.  Must be one of `overwrite`,
> +	`concatenate`, `cat_sort_uniq`, or `ignore`.  Defaults to
> +	`concatenate`.
>  +
>  This setting can be overridden with the `GIT_NOTES_REWRITE_MODE`
>  environment variable.

We are losing the mention of "notes.rewrite.<command>", which is outside the "unify" topic, isn't it?

Show 17 quoted lines
>  notes.rewriteRef::
>  	When copying notes during a rewrite, specifies the (fully
> -	qualified) ref whose notes should be copied.  The ref may be a
> -	glob, in which case notes in all matching refs will be copied.
> -	You may also specify this configuration several times.
> +	qualified) ref whose notes should be copied.  May be a glob,
> +	in which case notes in all matching refs will be copied.  You
> +	may also specify this configuration several times.
>  +
>  Does not have a default value; you must configure this variable to
>  enable note rewriting.  Set it to `refs/notes/commits` to enable
>  rewriting for the default commit notes.
>  +
> -This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
> -environment variable, which must be a colon separated list of refs or
> -globs.
> +Can be overridden with the `GIT_NOTES_REWRITE_REF` environment variable.
Ditto.
Thanks.
Previous: Matheus TavaresNext: Ævar Arnfjörð Bjarmason
Message 7 of 56 in “doc: unify config info on some cmds”
  1. 0/3 doc: unify config info on some cmdsMatheus Tavares, Jul 14, 2022
  2. 1/3 doc: grep: unify configuration variables definitionsMatheus Tavares, Jul 14, 2022
  3. Junio C HamanoJul 14, 2022
  4. 2/3 doc: apply: unify configuration variables definitionsMatheus Tavares, Jul 14, 2022
  5. Junio C HamanoJul 14, 2022
  6. 3/3 doc: notes: unify configuration variables definitionsMatheus Tavares, Jul 14, 2022
  7. Junio C HamanoJul 14, 2022
  8. Ævar Arnfjörð BjarmasonJul 14, 2022
  9. Matheus TavaresJul 15, 2022
  10. Ævar Arnfjörð BjarmasonJul 16, 2022
  11. Matheus TavaresJul 17, 2022
  12. 0/9 docs: de-duplicate sections, add more CONFIGURATION sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  13. 1/9 docs: add and use include template for config/* includesÆvar Arnfjörð Bjarmason, Jul 29, 2022
  14. Matheus TavaresJul 30, 2022
  15. 2/9 grep docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  16. Matheus TavaresJul 30, 2022
  17. 3/9 send-email docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  18. Matheus TavaresJul 30, 2022
  19. 5/9 notes docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  20. Matheus TavaresJul 30, 2022
  21. 6/9 difftool docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  22. Matheus TavaresJul 30, 2022
  23. 4/9 apply docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  24. Matheus TavaresJul 30, 2022
  25. 7/9 log docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Jul 29, 2022
  26. Matheus TavaresJul 30, 2022
  27. 8/9 docs: add CONFIGURATION sections that map to a built-inÆvar Arnfjörð Bjarmason, Jul 29, 2022
  28. Junio C HamanoJul 29, 2022
  29. 9/9 docs: add CONFIGURATION sections that fuzzy map to built-insÆvar Arnfjörð Bjarmason, Jul 29, 2022
  30. Junio C HamanoJul 29, 2022
  31. Matheus TavaresJul 30, 2022
  32. Junio C HamanoJul 30, 2022
  33. Matheus TavaresJul 30, 2022
  34. 0/9 docs: de-duplicate sections, add more CONFIGURATION sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  35. 1/9 docs: add and use include template for config/* includesÆvar Arnfjörð Bjarmason, Aug 31, 2022
  36. 2/9 grep docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  37. 4/9 apply docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  38. 3/9 send-email docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  39. 5/9 notes docs: de-duplicate and combine configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  40. 6/9 difftool docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  41. 7/9 log docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Aug 31, 2022
  42. 8/9 docs: add CONFIGURATION sections that map to a built-inÆvar Arnfjörð Bjarmason, Aug 31, 2022
  43. 9/9 docs: add CONFIGURATION sections that fuzzy map to built-insÆvar Arnfjörð Bjarmason, Aug 31, 2022
  44. Matheus TavaresSep 3, 2022
  45. 0/9 docs: de-duplicate sections, add more CONFIGURATION sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  46. 1/9 docs: add and use include template for config/* includesÆvar Arnfjörð Bjarmason, Sep 7, 2022
  47. 2/9 grep docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  48. 3/9 send-email docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  49. 4/9 apply docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  50. 5/9 notes docs: de-duplicate and combine configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  51. 6/9 difftool docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  52. 7/9 log docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason, Sep 7, 2022
  53. 8/9 docs: add CONFIGURATION sections that map to a built-inÆvar Arnfjörð Bjarmason, Sep 7, 2022
  54. 9/9 docs: add CONFIGURATION sections that fuzzy map to built-insÆvar Arnfjörð Bjarmason, Sep 7, 2022
  55. Matheus TavaresSep 7, 2022
  56. Junio C HamanoSep 7, 2022

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.