[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    [PATCH v2 0/4] advice: remove usage of `advice_*` global variables
From:       Ben Boeckel <mathstuf () gmail ! com>
Date:       2021-08-05 23:03:17
Message-ID: 20210805230321.532218-1-mathstuf () gmail ! com
[Download RAW message or body]

Hi,

When looking at global variable usage for my `branch.default*` settings,
I found the `advice_` variables which were simple enough to resolve.

This concludes the journey started in c4a09cc9ccb (Merge branch
'hw/advise-ng', 2020-03-25) to update the advice configuration API to
help avoid bad coding patterns in usage of the `advice_` global
variables.

New `advice_*` variables also in flight will conflict with this
patchset, but the conflict resolution is trivial (if not at all
automatic).

Thanks,

--Ben

---
v1 -> v2:
  - improve commit messages to mention the history of the current state
  - split the API updates between readers and writers of `advice_*` into
    separate commits
  - reorder commits to better show the progression of the replacement

Ben Boeckel (4):
  advice: add enum variants for missing advice variables
  advice: remove read uses of global `advice_` variables
  advice: add `advice_set` to update advice settings at runtime
  advice: remove static global variables for advice tracking

 advice.c                    | 88 ++++---------------------------------
 advice.h                    | 38 +++-------------
 branch.c                    |  2 +-
 builtin/add.c               |  8 ++--
 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                    |  2 +-
 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 +--
 24 files changed, 68 insertions(+), 162 deletions(-)


base-commit: eb27b338a3e71c7c4079fbac8aeae3f8fbb5c687
-- 
2.31.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic