diff options
author | Torgny Nyblom <kde@nyblom.org> | 2010-12-04 20:53:43 +0100 |
---|---|---|
committer | Torgny Nyblom <kde@nyblom.org> | 2010-12-04 20:53:43 +0100 |
commit | ce56750e8a47e3be86cf0c0964a145c7d7f943e5 (patch) | |
tree | 53f1f80707fc7f147a111a85593ecb92e72a67d5 /src/main.cpp | |
parent | 6e13e426db84b9137b98ba80552b91e3684085cd (diff) | |
download | svn2git-ce56750e8a47e3be86cf0c0964a145c7d7f943e5.tar svn2git-ce56750e8a47e3be86cf0c0964a145c7d7f943e5.tar.gz svn2git-ce56750e8a47e3be86cf0c0964a145c7d7f943e5.tar.bz2 svn2git-ce56750e8a47e3be86cf0c0964a145c7d7f943e5.tar.xz svn2git-ce56750e8a47e3be86cf0c0964a145c7d7f943e5.zip |
Add an option to print some stats after a run.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index ad6cde3..d6a5a6b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -105,6 +105,7 @@ static const CommandLineOption options[] = { {"--dry-run", "don't actually write anything"}, {"--debug-rules", "print what rule is being used for each file"}, {"--commit-interval NUMBER", "if passed the cache will be flushed to git every NUMBER of commits"}, + {"--stats", "after a run print some statistics about the rules"}, {"-h, --help", "show help"}, {"-v, --version", "show version"}, CommandLineLastOption @@ -113,6 +114,7 @@ static const CommandLineOption options[] = { int main(int argc, char **argv) { CommandLineParser::init(argc, argv); + Stats::init(); CommandLineParser::addOptionDefinitions(options); CommandLineParser *args = CommandLineParser::instance(); if (args->contains(QLatin1String("help")) || args->arguments().count() != 1) { @@ -230,6 +232,6 @@ int main(int argc, char **argv) repo->finalizeTags(); delete repo; } - + Stats::instance()->printStats(); return errors ? EXIT_FAILURE : EXIT_SUCCESS; } |