diff options
author | Torgny Nyblom <kde@nyblom.org> | 2010-12-21 10:30:15 +0100 |
---|---|---|
committer | Torgny Nyblom <kde@nyblom.org> | 2010-12-21 10:42:44 +0100 |
commit | 508a67a69eafd07a2e1ce9020983e7113b91d919 (patch) | |
tree | 31e9972a16a75dfce6e70e3abd19f43d31cc8381 /src/main.cpp | |
parent | d57295761cdea09bc93a73c0189c971da29b92a4 (diff) | |
download | svn2git-508a67a69eafd07a2e1ce9020983e7113b91d919.tar svn2git-508a67a69eafd07a2e1ce9020983e7113b91d919.tar.gz svn2git-508a67a69eafd07a2e1ce9020983e7113b91d919.tar.bz2 svn2git-508a67a69eafd07a2e1ce9020983e7113b91d919.tar.xz svn2git-508a67a69eafd07a2e1ce9020983e7113b91d919.zip |
Fix the --version option
When supplying --version the git commit that was used to create the
version should be printed to stdout.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 1cabbad..e6a2bfa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -117,6 +117,10 @@ int main(int argc, char **argv) CommandLineParser::addOptionDefinitions(options); Stats::init(); CommandLineParser *args = CommandLineParser::instance(); + if(args->contains(QLatin1String("version"))) { + printf("Git version: %s\n", VER); + return 0; + } if (args->contains(QLatin1String("help")) || args->arguments().count() != 1) { args->usage(QString(), "[Path to subversion repo]"); return 0; |