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

[PATCH v4 0/4] advice: remove usage of `advice_*` global variables

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 23, 2021, 10:43 UTC
Message-ID
<cover-v4-0.4-00000000000-20210823T103719Z-avarab@gmail.com>
In-Reply-To
<RFC-cover-v3-0.4-0000000000-20210806T191231Z-avarab@gmail.com>

I reviewed Ben Boeckel's advice() patches in https://lore.kernel.org/git/RFC-cover-v3-0.4-0000000000-20210806T191231Z-avarab@gmail.com and submitted that review as an RFC. Since there's been no feedback there from the author here's a non-RFC version.

The only change from v3 is the commit message typos/grammar fixes pointed out by Eric Sunshine. Thanks!

Ben Boeckel (2):
  advice: add enum variants for missing advice variables
  advice: remove read uses of most global `advice_` variables
Ævar Arnfjörð Bjarmason (2):
  advice: remove use of global advice_add_embedded_repo
  advice: move advice.graftFileDeprecated squashing to commit.[ch]
 advice.c                    | 83 ++-----------------------------------
 advice.h                    | 33 +--------------
 branch.c                    |  2 +-
 builtin/add.c               | 11 ++---
 builtin/am.c                |  2 +-
 builtin/checkout.c          |  6 +--
 builtin/clone.c             |  2 +-
 builtin/commit.c            |  4 +-
 builtin/fetch.c             |  2 +-
 builtin/merge.c             |  4 +-
 builtin/push.c              | 12 +++---
 builtin/replace.c           |  2 +-
 builtin/reset.c             |  2 +-
 builtin/rm.c                |  2 +-
 builtin/submodule--helper.c |  2 +-
 commit.c                    |  4 +-
 commit.h                    |  1 +
 editor.c                    |  2 +-
 notes-merge.c               |  2 +-
 object-name.c               |  2 +-
 remote.c                    | 12 +++---
 run-command.c               |  2 +-
 sequencer.c                 |  8 ++--
 unpack-trees.c              | 18 ++++----
 wt-status.c                 |  6 +--
 25 files changed, 63 insertions(+), 163 deletions(-)
Range-diff against v3:
1:  5f934bb083b = 1:  4e977e9d5a1 advice: add enum variants for missing advice variables
2:  eefcafcf8f5 ! 2:  3869bda3b39 advice: remove read uses of most global `advice_` variables
    @@ Commit message
         This patch ports all but two uses which read the status of the global
         `advice_` variables over to the new `advice_enabled` API. We'll deal
         with advice_add_embedded_repo and advice_graft_file_deprecated
    -    seperately.
    +    separately.
     
         Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
3:  02613d0f307 ! 3:  e1018212e40 advice: remove use of global advice_add_embedded_repo
    @@ Commit message
         advice: remove use of global advice_add_embedded_repo
     
         The external use of this variable was added in 532139940c9 (add: warn
    -    when adding an embedded repository, 2017-06-14), for the use-case it's
    -    more straightforward to track whether we've adviced in
    +    when adding an embedded repository, 2017-06-14). For the use-case it's
    +    more straightforward to track whether we've shown advice in
         check_embedded_repo() than setting the global variable.
     
         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
4:  fe6f6328f9c = 4:  7f79fb282e5 advice: move advice.graftFileDeprecated squashing to commit.[ch]
-- 
2.33.0.663.gfcc3c7013a8
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 27 of 32 in “advice: remove usage of `advice_*` global variables”
  1. 0/4 advice: remove usage of `advice_*` global variablesBen Boeckel, Jul 31, 2021
  2. 1/4 advice: add a function to set the value of an advice typeBen Boeckel, Jul 31, 2021
  3. Johannes SchindelinAug 2, 2021
  4. 2/4 advice: add enum variants for missing advice variablesBen Boeckel, Jul 31, 2021
  5. Johannes SchindelinAug 2, 2021
  6. Ben BoeckelAug 3, 2021
  7. 3/4 advice: remove uses of global `advice_` variablesBen Boeckel, Jul 31, 2021
  8. Johannes SchindelinAug 2, 2021
  9. Ben BoeckelAug 3, 2021
  10. 4/4 advice: remove static global variables for advice trackingBen Boeckel, Jul 31, 2021
  11. Johannes SchindelinAug 2, 2021
  12. Ben BoeckelAug 3, 2021
  13. Johannes SchindelinAug 2, 2021
  14. Ben BoeckelAug 3, 2021
  15. 0/4 advice: remove usage of `advice_*` global variablesBen Boeckel, Aug 5, 2021
  16. 1/4 advice: add enum variants for missing advice variablesBen Boeckel, Aug 5, 2021
  17. 2/4 advice: remove read uses of global `advice_` variablesBen Boeckel, Aug 5, 2021
  18. 3/4 advice: add `advice_set` to update advice settings at runtimeBen Boeckel, Aug 5, 2021
  19. 4/4 advice: remove static global variables for advice trackingBen Boeckel, Aug 5, 2021
  20. 0/4 advice: remove usage of `advice_*` global variablesÆvar Arnfjörð Bjarmason, Aug 6, 2021
  21. 2/4 advice: remove read uses of most global `advice_` variablesÆvar Arnfjörð Bjarmason, Aug 6, 2021
  22. Eric SunshineAug 6, 2021
  23. 1/4 advice: add enum variants for missing advice variablesÆvar Arnfjörð Bjarmason, Aug 6, 2021
  24. 3/4 advice: remove use of global advice_add_embedded_repoÆvar Arnfjörð Bjarmason, Aug 6, 2021
  25. Eric SunshineAug 6, 2021
  26. 4/4 advice: move advice.graftFileDeprecated squashing to commit.[ch]Ævar Arnfjörð Bjarmason, Aug 6, 2021
  27. 0/4 advice: remove usage of `advice_*` global variablesÆvar Arnfjörð Bjarmason, Aug 23, 2021
  28. 1/4 advice: add enum variants for missing advice variablesÆvar Arnfjörð Bjarmason, Aug 23, 2021
  29. 2/4 advice: remove read uses of most global `advice_` variablesÆvar Arnfjörð Bjarmason, Aug 23, 2021
  30. 3/4 advice: remove use of global advice_add_embedded_repoÆvar Arnfjörð Bjarmason, Aug 23, 2021
  31. 4/4 advice: move advice.graftFileDeprecated squashing to commit.[ch]Ævar Arnfjörð Bjarmason, Aug 23, 2021
  32. Junio C HamanoAug 25, 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.