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

Function get_internal_state_path

commands.cpp:240–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240static std::string get_internal_state_path ()
241{
242 // git rev-parse --git-dir
243 std::vector<std::string> command;
244 command.push_back("git");
245 command.push_back("rev-parse");
246 command.push_back("--git-dir");
247
248 std::stringstream output;
249
250 if (!successful_exit(exec_command(command, output))) {
251 throw Error("'git rev-parse --git-dir' failed - is this a Git repository?");
252 }
253
254 std::string path;
255 std::getline(output, path);
256 path += "/git-crypt";
257
258 return path;
259}
260
261static std::string get_internal_keys_path (const std::string& internal_state_path)
262{

Callers 1

get_internal_keys_pathFunction · 0.85

Calls 3

successful_exitFunction · 0.85
exec_commandFunction · 0.85
ErrorClass · 0.85

Tested by

no test coverage detected