aboutsummaryrefslogtreecommitdiffstats
path: root/mailmap.h
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2024-08-27 14:27:17 -0700
committerJunio C Hamano <gitster@pobox.com>2024-08-27 14:51:29 -0700
commitf54ca6ae72e32e34f2042a93f92949e3ded11a36 (patch)
treef8bcbd406414e655ac5b69ce2652efaaf1f3f31e /mailmap.h
parentcheck-mailmap: accept "user@host" contacts (diff)
downloadgit-f54ca6ae72e32e34f2042a93f92949e3ded11a36.tar.gz
git-f54ca6ae72e32e34f2042a93f92949e3ded11a36.zip
check-mailmap: add options for additional mailmap sources
The git check-mailmap command reads the mailmap from either the default .mailmap location and then from the mailmap.blob and mailmap.file configurations. A following change to git send-email will want to support new configuration options based on the configured identity. The identity-based configuration and options only make sense in the context of git send-email. Expose the read_mailmap_file and read_mailmap_blob functions from mailmap.c. Teach git check-mailmap the --mailmap-file and --mailmap-blob options which load the additional mailmap sources. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mailmap.h')
-rw-r--r--mailmap.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mailmap.h b/mailmap.h
index cbda9bc5e0..908365e1bf 100644
--- a/mailmap.h
+++ b/mailmap.h
@@ -6,6 +6,13 @@ struct string_list;
extern char *git_mailmap_file;
extern char *git_mailmap_blob;
+/* 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 string_list *map, const char *name);
+
int read_mailmap(struct string_list *map);
void clear_mailmap(struct string_list *map);