| 125 | } |
| 126 | |
| 127 | static bool git_has_config (const std::string& name) |
| 128 | { |
| 129 | std::vector<std::string> command; |
| 130 | command.push_back("git"); |
| 131 | command.push_back("config"); |
| 132 | command.push_back("--get-all"); |
| 133 | command.push_back(name); |
| 134 | |
| 135 | std::stringstream output; |
| 136 | switch (exit_status(exec_command(command, output))) { |
| 137 | case 0: return true; |
| 138 | case 1: return false; |
| 139 | default: throw Error("'git config' failed"); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | static void git_deconfig (const std::string& name) |
| 144 | { |
no test coverage detected