29#include <wx/filename.h>
38 git_repository_free(
m_repo );
46 if( !clonePath.DirExists() )
48 if( !clonePath.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
50 AddErrorString( wxString::Format(
_(
"Could not create directory '%s'" ),
56 git_clone_options cloneOptions;
57 git_clone_init_options( &cloneOptions, GIT_CLONE_OPTIONS_VERSION );
58 cloneOptions.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
60 cloneOptions.checkout_opts.progress_payload =
this;
63 cloneOptions.fetch_opts.callbacks.payload =
this;
69 &cloneOptions ) != 0 )
void UpdateProgress(int aCurrent, int aTotal, const wxString &aMessage) override
void ReportProgress(int aCurrent, int aTotal, const wxString &aMessage)
std::unique_ptr< WX_PROGRESS_REPORTER > m_progressReporter
void AddErrorString(const wxString aErrorString)
void clone_progress_cb(const char *aStr, size_t aLen, size_t aTotal, void *data)
int transfer_progress_cb(const git_transfer_progress *aStats, void *aPayload)
int credentials_cb(git_cred **aOut, const char *aUrl, const char *aUsername, unsigned int aAllowedTypes, void *aPayload)