diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-02 23:58:14 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-03 00:03:15 -0700 |
commit | 50acc58914bf02217e55fdd739a844f2bfc45410 (patch) | |
tree | 18acecbbc68b6387bf99a7e72431a2acb3ea4688 /builtin-blame.c | |
parent | 6644d2f2c490f8a7081bd7e5da12c19400c8b6ef (diff) | |
download | git-50acc58914bf02217e55fdd739a844f2bfc45410.tar.gz |
blame: use .mailmap unconditionally
There really isn't any point in turning off .mailmap. The
number of mailmap lookups are bounded by number of lines in the
target file, and the real blame processing is much more
expensive. If it turns out to be too costly, we should optimize
the mailmap lookup itself, instead of avoiding the call.
If the author information of commits of the project are
relatively clean, .mailmap would have only small number of
entries, and the overhead of looking it up will not be high. On
the other hand, if the author information is really screwed up
that a good .mailmap needs to be maintained to run shortlog,
giving uncleaned names in blame output is not helpful at all
either.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-blame.c')
-rw-r--r-- | builtin-blame.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/builtin-blame.c b/builtin-blame.c index 3442d282aa..6d6a577d68 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -20,13 +20,12 @@ #include "mailmap.h" static char blame_usage[] = -"git-blame [-c] [-b] [-l] [--root] [-x] [-t] [-f] [-n] [-s] [-p] [-L n,m] [-S <revs-file>] [-M] [-C] [-C] [--contents <filename>] [--incremental] [commit] [--] file\n" +"git-blame [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-p] [-L n,m] [-S <revs-file>] [-M] [-C] [-C] [--contents <filename>] [--incremental] [commit] [--] file\n" " -c Use the same output mode as git-annotate (Default: off)\n" " -b Show blank SHA-1 for boundary commits (Default: off)\n" " -l Show long commit SHA1 (Default: off)\n" " --root Do not treat root commits as boundaries (Default: off)\n" " -t Show raw timestamp (Default: off)\n" -" -x Do not use .mailmap file\n" " -f, --show-name Show original filename (Default: auto)\n" " -n, --show-number Show original linenumber (Default: off)\n" " -s Suppress author name and timestamp (Default: off)\n" @@ -46,7 +45,6 @@ static int show_root; static int blank_boundary; static int incremental; static int cmd_is_annotate; -static int no_mailmap; static struct path_list mailmap; #ifndef DEBUG @@ -2173,9 +2171,6 @@ int cmd_blame(int argc, const char **argv, const char *prefix) else if (!strcmp("-p", arg) || !strcmp("--porcelain", arg)) output_option |= OUTPUT_PORCELAIN; - else if (!strcmp("-x", arg) || - !strcmp("--no-mailmap", arg)) - no_mailmap = 1; else if (!strcmp("--", arg)) { seen_dashdash = 1; i++; @@ -2375,8 +2370,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix) die("reading graft file %s failed: %s", revs_file, strerror(errno)); - if (!no_mailmap) - read_mailmap(&mailmap, ".mailmap", NULL); + read_mailmap(&mailmap, ".mailmap", NULL); assign_blame(&sb, &revs, opt); |