Thread (2 messages) flat view 2 messages, 2 authors, 2021-02-10

Re: [PATCH] mailmap: only look for .mailmap in work tree

From: Junio C Hamano <hidden>
Date: 2021-02-09 22:25:09

Jeff King [off-list ref] writes:
  If the file `.mailmap` exists at the toplevel of the repository[...]

which likewise reinforces the notion that we are looking in the working
tree.
quoted hunk
diff --git a/mailmap.c b/mailmap.c
index eb77c6e77c..9bb9cf8b30 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -225,7 +225,8 @@ int read_mailmap(struct string_list *map)
 	if (!git_mailmap_blob && is_bare_repository())
 		git_mailmap_blob = "HEAD:.mailmap";
 
-	err |= read_mailmap_file(map, ".mailmap");
+	if (!startup_info->have_repository || !is_bare_repository())
+		err |= read_mailmap_file(map, ".mailmap");
OK.  Do we know at this point that cwd is always/already at the root
level of the working tree?

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help