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

Function get_git_config

commands.cpp:280–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280std::string get_git_config (const std::string& name)
281{
282 // git config --get
283 std::vector<std::string> command;
284 command.push_back("git");
285 command.push_back("config");
286 command.push_back("--get");
287 command.push_back(name);
288
289 std::stringstream output;
290
291 if (!successful_exit(exec_command(command, output))) {
292 throw Error("'git config' missing value for key '" + name +"'");
293 }
294
295 std::string value;
296 std::getline(output, value);
297
298 return value;
299}
300
301static std::string get_repo_state_path ()
302{

Callers 2

gpg_get_executableFunction · 0.85
get_repo_state_pathFunction · 0.85

Calls 3

successful_exitFunction · 0.85
exec_commandFunction · 0.85
ErrorClass · 0.85

Tested by

no test coverage detected