62 git_repository* repo =
GetRepo();
67 const char* workdir = git_repository_workdir( repo );
72 return wxString( workdir );
77 git_repository* repo =
GetRepo();
82 git_config*
config =
nullptr;
84 if( git_repository_config( &
config, repo ) != GIT_OK )
92 git_config_entry* entry =
nullptr;
93 int result = git_config_get_entry( &entry,
config, aKey.mb_str() );
96 if( result != GIT_OK || entry ==
nullptr )
98 wxLogTrace(
traceGit,
"Config key '%s' not found", aKey );
102 aValue = wxString( entry->value );
virtual ~GIT_CONFIG_HANDLER()
GitUserConfig GetUserConfig()
Get user configuration (name and email) from git config Falls back to common settings if not found in...
GIT_CONFIG_HANDLER(KIGIT_COMMON *aCommon)
void UpdateProgress(int aCurrent, int aTotal, const wxString &aMessage) override
wxString GetWorkingDirectory()
Get the repository working directory path.
bool GetConfigString(const wxString &aKey, wxString &aValue)
Get a string value from git config.
void ReportProgress(int aCurrent, int aTotal, const wxString &aMessage)
static wxString GetLastGitError()
git_repository * GetRepo() const
Get a pointer to the git repository.
virtual COMMON_SETTINGS * GetCommonSettings() const
const wxChar *const traceGit
Flag to enable Git debugging output.
std::unique_ptr< git_config_entry, decltype([](git_config_entry *aEntry) { git_config_entry_free(aEntry) GitConfigEntryPtr
A unique pointer for git_config_entry objects with automatic cleanup.
std::unique_ptr< git_config, decltype([](git_config *aConfig) { git_config_free(aConfig) GitConfigPtr
A unique pointer for git_config objects with automatic cleanup.
PGM_BASE & Pgm()
The global program "get" accessor.
wxLogTrace helper definitions.