MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / getConfigValue

Method getConfigValue

plugins/vcs/Repository.cpp:378–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378std::string Repository::getConfigValue(const std::string& key)
379{
380 git_config* config;
381 auto error = git_repository_config_snapshot(&config, _repository);
382 GitException::ThrowOnError(error);
383
384 try
385 {
386 const char* value;
387 auto error = git_config_get_string(&value, config, key.c_str());
388 GitException::ThrowOnError(error);
389
390 // Copy the value before free-ing the config
391 std::string returnValue(value);
392
393 git_config_free(config);
394
395 return returnValue;
396 }
397 catch (const GitException& ex)
398 {
399 git_config_free(config);
400 throw ex;
401 }
402}
403
404void Repository::cleanupState()
405{

Callers 2

tryToFinishMergeFunction · 0.80
performCommitMethod · 0.80

Calls 1

c_strMethod · 0.45

Tested by

no test coverage detected