blame: --show-stats for easier optimization work.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-11-05 11:52:43 -08:00
Родитель c230390b47
Коммит 870b39c15f
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -2065,6 +2065,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
int i, seen_dashdash, unk, opt; int i, seen_dashdash, unk, opt;
long bottom, top, lno; long bottom, top, lno;
int output_option = 0; int output_option = 0;
int show_stats = 0;
const char *revs_file = NULL; const char *revs_file = NULL;
const char *final_commit_name = NULL; const char *final_commit_name = NULL;
char type[10]; char type[10];
@ -2086,6 +2087,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
blank_boundary = 1; blank_boundary = 1;
else if (!strcmp("--root", arg)) else if (!strcmp("--root", arg))
show_root = 1; show_root = 1;
else if (!strcmp(arg, "--show-stats"))
show_stats = 1;
else if (!strcmp("-c", arg)) else if (!strcmp("-c", arg))
output_option |= OUTPUT_ANNOTATE_COMPAT; output_option |= OUTPUT_ANNOTATE_COMPAT;
else if (!strcmp("-t", arg)) else if (!strcmp("-t", arg))
@ -2348,7 +2351,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
ent = e; ent = e;
} }
if (DEBUG) { if (show_stats) {
printf("num read blob: %d\n", num_read_blob); printf("num read blob: %d\n", num_read_blob);
printf("num get patch: %d\n", num_get_patch); printf("num get patch: %d\n", num_get_patch);
printf("num commits: %d\n", num_commits); printf("num commits: %d\n", num_commits);