| 278 | } |
| 279 | |
| 280 | std::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 | |
| 301 | static std::string get_repo_state_path () |
| 302 | { |
no test coverage detected