Files
git/mailmap.h
Burak Kaan Karaçay 6aea51bc3b mailmap: drop global config variables
The 'mailmap.file' and 'mailmap.blob' configurations are currently
parsed and stored in the global variables 'git_mailmap_file' and
'git_mailmap_blob'. Since these values are typically only needed once
when initializing a mailmap, there is no need to keep them as global
state throughout the lifetime of the Git process.

To reduce global state, remove these global variables and instead use
'repo_config_get_*' functions to read the configuration on demand.

Signed-off-by: Burak Kaan Karaçay <bkkaracay@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-20 08:13:58 -08:00

22 lines
579 B
C

#ifndef MAILMAP_H
#define MAILMAP_H
struct repository;
struct string_list;
/* Flags for read_mailmap_file() */
#define MAILMAP_NOFOLLOW (1<<0)
int read_mailmap_file(struct string_list *map, const char *filename,
unsigned flags);
int read_mailmap_blob(struct repository *repo, struct string_list *map,
const char *name);
int read_mailmap(struct repository *repo, struct string_list *map);
void clear_mailmap(struct string_list *map);
int map_user(struct string_list *map,
const char **email, size_t *emaillen, const char **name, size_t *namelen);
#endif