--- a/src/main.cpp Sat Feb 01 15:42:48 2025 +0100 +++ b/src/main.cpp Sat Feb 01 16:01:14 2025 +0100 @@ -70,11 +70,11 @@ "to specify a file that contains pairs of author strings, like in the following\n" "example:\n\n" " Full Name <full.name@example.org> = New Name <new.name@example.org>\n" - " just.mail@example.org = new.name@example.org\n" - " username = new.name\n\n" + " just.mail@example.org = Jus Mail <just.mail@example.org>\n" + " jane = Jane Doe <jane.doe@example.org>\n\n" "The different variants of full string, only mail address, and only local-part\n" - "can be combined as you like. When you use the \033[1m--author\033[22m option at the same\n" - "time, you only need to specify the new author names.\n\n" + "should \033[4monly\033[24m be used on the left-hand side. When you use the \033[1m--author\033[22m option at\n" + "the same time, you only need to specify the new author names.\n\n" "Finally, this tool prints an HTML page to stdout. A separate heap map is\n" "generated for each author showing commits across all repositories, unless the\n" "\033[1m--separate\033[22m option is specified in which case each repository is displayed with\n" @@ -126,6 +126,16 @@ settings.update_repos = false; } else if (chk_arg(argv[i], "-s", "--separate")) { settings.separate = true; + } else if (chk_arg(argv[i], "-A", "--authormap")) { + if (i + 1 < argc) { + if (settings.parse_authormap(argv[++i])) { + fputs("parsing authormap failed\n", stderr); + return -1; + } + } else { + fputs("missing filename for authormap\n", stderr); + return -1; + } } else if (chk_arg(argv[i], "--hg", nullptr)) { if (i + 1 < argc) { settings.hg.assign(argv[++i]); @@ -225,7 +235,7 @@ fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); return EXIT_FAILURE; } - heatmap.add(proc.output()); + heatmap.add(settings, proc.output()); } else { proc.setbin(settings.git); if (proc.exec_log({"log", @@ -235,7 +245,7 @@ fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); return EXIT_FAILURE; } - heatmap.add(proc.output()); + heatmap.add(settings, proc.output()); } }