Tue, 18 Feb 2025 18:43:01 +0100
do not pull repos by default - fixes #587
src/main.cpp | file | annotate | diff | comparison | revisions | |
src/settings.h | file | annotate | diff | comparison | revisions |
--- a/src/main.cpp Tue Feb 18 18:37:33 2025 +0100 +++ b/src/main.cpp Tue Feb 18 18:43:01 2025 +0100 @@ -46,7 +46,7 @@ " -d, --depth <num> The search depth (default: 1, max: 255)\n" " -f, --fragment Output as fragment\n" " -h, --help Print this help message\n" - " -n, --no-pull Do not pull the repositories\n" + " -p, --pull Try to pull the repositories\n" " -s, --separate Output a separate heat map for each repository\n" " -y, --year <year> The year for which to create the heat map\n" " --hg <path> Path to hg binary (default: /usr/bin/hg)\n" @@ -56,12 +56,12 @@ "By default, the recursion \033[1mdepth\033[22m is one, meaning that this tool assumes that\n" "each \033[1mpath\033[22m is either a repository or contains repositories as subdirectories.\n" "You can change the \033[1mdepth\033[22m to support other directory structures.\n\n" - "When you do not specify \033[1m--no-pull\033[22m, this tool will execute the pull command\n" + "When you specify the \033[1m--pull\033[22m option, this tool will execute the pull command\n" "(and for hg the update command) before retrieving the commit log, assuming\n" "to be on the default branch with \033[4mno uncommitted changes\033[24m. If pulling leads to\n" "an error, an error message is written to stderr and the process continues\n" "with the repository in its current state. This is also the case when pulling\n" - "requires authorization.\n\n" + "would require authorization.\n\n" "By default, this tool reports commits from all authors. If you want to include\n" "only specific authors in the report, you can use the \033[1m--author\033[22m option with as\n" "many authors as you like. You can specify either the full author strings with\n" @@ -125,8 +125,8 @@ fputs("missing author name\n", stderr); return -1; } - } else if (chk_arg(argv[i], "-n", "--no-pull")) { - settings.update_repos = false; + } else if (chk_arg(argv[i], "-p", "--pull")) { + settings.update_repos = true; } else if (chk_arg(argv[i], "-f", "--fragment")) { settings.fragment = true; } else if (chk_arg(argv[i], "-s", "--separate")) {
--- a/src/settings.h Tue Feb 18 18:37:33 2025 +0100 +++ b/src/settings.h Tue Feb 18 18:43:01 2025 +0100 @@ -42,7 +42,7 @@ std::unordered_map<std::string, std::string> authormap; unsigned char depth = 1; - bool update_repos = true; + bool update_repos = false; bool separate = false; bool fragment = false; unsigned short year = settings_current_year;