We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbd11b0 commit f4f5c0fCopy full SHA for f4f5c0f
2 files changed
src/main.cpp
@@ -39,7 +39,7 @@ int main(int argc, char** argv)
39
std::cout << "git2cpp version " << GIT2CPP_VERSION_STRING << " (libgit2 " << LIBGIT2_VERSION << ")" << std::endl;
40
}
41
42
- if (app.get_subcommands().size() == 0)
+ if (app.get_subcommands().size() == 0 && !version)
43
{
44
std::cout << app.help() << std::endl;
45
test/test_git.py
@@ -8,7 +8,8 @@ def test_version(git2cpp_path, arg):
8
p = subprocess.run(cmd, capture_output=True)
9
assert p.returncode == 0
10
assert p.stderr == b''
11
- assert p.stdout.startswith(b'git2cpp ')
+ assert p.stdout.startswith(b'git2cpp version ')
12
+ assert p.stdout.count(b'\n') == 1
13
14
15
def test_error_on_unknown_option(git2cpp_path):
0 commit comments