44 " (repeat option to report multiple authors)\n" |
44 " (repeat option to report multiple authors)\n" |
45 " -A, --authormap <file> Apply an author mapping file\n" |
45 " -A, --authormap <file> Apply an author mapping file\n" |
46 " -d, --depth <num> The search depth (default: 1, max: 255)\n" |
46 " -d, --depth <num> The search depth (default: 1, max: 255)\n" |
47 " -f, --fragment Output as fragment\n" |
47 " -f, --fragment Output as fragment\n" |
48 " -h, --help Print this help message\n" |
48 " -h, --help Print this help message\n" |
49 " -n, --no-pull Do not pull the repositories\n" |
49 " -p, --pull Try to pull the repositories\n" |
50 " -s, --separate Output a separate heat map for each repository\n" |
50 " -s, --separate Output a separate heat map for each repository\n" |
51 " -y, --year <year> The year for which to create the heat map\n" |
51 " -y, --year <year> The year for which to create the heat map\n" |
52 " --hg <path> Path to hg binary (default: /usr/bin/hg)\n" |
52 " --hg <path> Path to hg binary (default: /usr/bin/hg)\n" |
53 " --git <path> Path to git binary (default: /usr/bin/git)\n\n" |
53 " --git <path> Path to git binary (default: /usr/bin/git)\n\n" |
54 "Scans all specified paths recursively for Mercurial and Git repositories and\n" |
54 "Scans all specified paths recursively for Mercurial and Git repositories and\n" |
55 "creates a commit heat map for the specified \033[1myear\033[22m or the current year.\n" |
55 "creates a commit heat map for the specified \033[1myear\033[22m or the current year.\n" |
56 "By default, the recursion \033[1mdepth\033[22m is one, meaning that this tool assumes that\n" |
56 "By default, the recursion \033[1mdepth\033[22m is one, meaning that this tool assumes that\n" |
57 "each \033[1mpath\033[22m is either a repository or contains repositories as subdirectories.\n" |
57 "each \033[1mpath\033[22m is either a repository or contains repositories as subdirectories.\n" |
58 "You can change the \033[1mdepth\033[22m to support other directory structures.\n\n" |
58 "You can change the \033[1mdepth\033[22m to support other directory structures.\n\n" |
59 "When you do not specify \033[1m--no-pull\033[22m, this tool will execute the pull command\n" |
59 "When you specify the \033[1m--pull\033[22m option, this tool will execute the pull command\n" |
60 "(and for hg the update command) before retrieving the commit log, assuming\n" |
60 "(and for hg the update command) before retrieving the commit log, assuming\n" |
61 "to be on the default branch with \033[4mno uncommitted changes\033[24m. If pulling leads to\n" |
61 "to be on the default branch with \033[4mno uncommitted changes\033[24m. If pulling leads to\n" |
62 "an error, an error message is written to stderr and the process continues\n" |
62 "an error, an error message is written to stderr and the process continues\n" |
63 "with the repository in its current state. This is also the case when pulling\n" |
63 "with the repository in its current state. This is also the case when pulling\n" |
64 "requires authorization.\n\n" |
64 "would require authorization.\n\n" |
65 "By default, this tool reports commits from all authors. If you want to include\n" |
65 "By default, this tool reports commits from all authors. If you want to include\n" |
66 "only specific authors in the report, you can use the \033[1m--author\033[22m option with as\n" |
66 "only specific authors in the report, you can use the \033[1m--author\033[22m option with as\n" |
67 "many authors as you like. You can specify either the full author strings with\n" |
67 "many authors as you like. You can specify either the full author strings with\n" |
68 "name and mail address, just the mail address, or even just the local-part of\n" |
68 "name and mail address, just the mail address, or even just the local-part of\n" |
69 "the mail address. In case your repository contains commits from an author who\n" |
69 "the mail address. In case your repository contains commits from an author who\n" |
123 settings.authors.emplace_back(argv[++i]); |
123 settings.authors.emplace_back(argv[++i]); |
124 } else { |
124 } else { |
125 fputs("missing author name\n", stderr); |
125 fputs("missing author name\n", stderr); |
126 return -1; |
126 return -1; |
127 } |
127 } |
128 } else if (chk_arg(argv[i], "-n", "--no-pull")) { |
128 } else if (chk_arg(argv[i], "-p", "--pull")) { |
129 settings.update_repos = false; |
129 settings.update_repos = true; |
130 } else if (chk_arg(argv[i], "-f", "--fragment")) { |
130 } else if (chk_arg(argv[i], "-f", "--fragment")) { |
131 settings.fragment = true; |
131 settings.fragment = true; |
132 } else if (chk_arg(argv[i], "-s", "--separate")) { |
132 } else if (chk_arg(argv[i], "-s", "--separate")) { |
133 settings.separate = true; |
133 settings.separate = true; |
134 } else if (chk_arg(argv[i], "-A", "--authormap")) { |
134 } else if (chk_arg(argv[i], "-A", "--authormap")) { |