Skip to content

mailmap: reduce global state

Burak Kaan Karaçay git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Forward declare 'struct repository' in mailmap.h
- Fix whitespace problems

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mailmap: stop using the_repositorybuiltin/blame.c builtin/cat-file.c builtin/check-mailmap.c +7 more+19 -160 replies
2/2mailmap: drop global config variablesenvironment.c mailmap.c mailmap.h+14 -290 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [GSOC PATCH v2 0/2] mailmap: reduce global state

Hi,

This patch series aims to reduce the global variable dependency of the mailmap subsystem:

- Patch 1 eliminates the implicit 'the_repository' dependency in the 'read_mailmap' and 'read_mailmap_blob' functions by adding a 'struct repository' parameter.

- Patch 2 removes the 'git_mailmap_file' and 'git_mailmap_blob' global variables, shifting to on-demand configuration reading via the config set helpers and using local variables.

Changes in v2:
- Forward declare 'struct repository' in mailmap.h
- Fix whitespace problems

Thanks to Junio for the kind words and for catching the 'make hdr-check' issue.

Burak Kaan Karaçay (2):
mailmap: stop using the_repository
mailmap: drop global config variables

 builtin/blame.c         |  2 +-
 builtin/cat-file.c      |  2 +-
 builtin/check-mailmap.c |  4 ++--
 builtin/commit.c        |  2 +-
 builtin/log.c           |  2 +-
 builtin/shortlog.c      |  2 +-
 environment.c           | 19 -------------------
 mailmap.c               | 30 +++++++++++++++++++-----------
 mailmap.h               |  9 ++++-----
 pretty.c                |  2 +-
 ref-filter.c            |  2 +-
 11 files changed, 32 insertions(+), 44 deletions(-)
Signature · 1 line
2.52.0