Remove pointless calls to access(2) when checking for .mailmap
read_mailmap already returns not 0 in case of error, and nothing seem to be interested in it. It also is silent about the fact (read_mailmap being to chatty would justify the call to access, but there is no point for it to be and it isn't). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Alex Riesen committed
May 1, 2007 at 00:27 UTC
e44b5d106c2934b93cfba2ea7fb2ed1e32edaae2
2 files changed
+2
-3
builtin-blame.c
+1
-1
@@ -2375,7 +2375,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
2375
die("reading graft file %s failed: %s",
2376
revs_file, strerror(errno));
2377
2378
- if (!no_mailmap && !access(".mailmap", R_OK))
2378
+ if (!no_mailmap)
2379
read_mailmap(&mailmap, ".mailmap", NULL);
2380
2381
assign_blame(&sb, &revs, opt);
builtin-shortlog.c
+1
-2
@@ -283,8 +283,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
283
if (argc > 1)
284
die ("unrecognized argument: %s", argv[1]);
285
286
- if (!access(".mailmap", R_OK))
287
- read_mailmap(&mailmap, ".mailmap", &common_repo_prefix);
286
+ read_mailmap(&mailmap, ".mailmap", &common_repo_prefix);
287
288
if (rev.pending.nr == 0) {
289
if (isatty(0))