MCPcopy Create free account
hub / github.com/AGWA/git-crypt / git_version_string

Function git_version_string

commands.cpp:71–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static std::string git_version_string ()
72{
73 std::vector<std::string> command;
74 command.push_back("git");
75 command.push_back("version");
76
77 std::stringstream output;
78 if (!successful_exit(exec_command(command, output))) {
79 throw Error("'git version' failed - is Git installed?");
80 }
81 std::string word;
82 output >> word; // "git"
83 output >> word; // "version"
84 output >> word; // "1.7.10.4"
85 return word;
86}
87
88static std::vector<int> parse_version (const std::string& str)
89{

Callers 1

commands.cppFile · 0.85

Calls 3

successful_exitFunction · 0.85
exec_commandFunction · 0.85
ErrorClass · 0.85

Tested by

no test coverage detected