reflog: use parse_config_key in config callback
[gitweb.git] / mailmap.c
index 5ffe48a60478ada46b4ab1fac1b6dd7abe3fc918..b16542febec14ed86fd7ef21ba19899d08c95a64 100644 (file)
--- a/mailmap.c
+++ b/mailmap.c
@@ -233,7 +233,12 @@ static int read_mailmap_blob(struct string_list *map,
 int read_mailmap(struct string_list *map, char **repo_abbrev)
 {
        int err = 0;
+
        map->strdup_strings = 1;
+
+       if (!git_mailmap_blob && is_bare_repository())
+               git_mailmap_blob = "HEAD:.mailmap";
+
        err |= read_mailmap_file(map, ".mailmap", repo_abbrev);
        err |= read_mailmap_blob(map, git_mailmap_blob, repo_abbrev);
        err |= read_mailmap_file(map, git_mailmap_file, repo_abbrev);