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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux