29#include <wx/filename.h>
37 git_repository_free(
m_repo );
45 if( !clonePath.DirExists() )
47 if( !clonePath.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
54 git_clone_options cloneOptions;
55 git_clone_init_options( &cloneOptions, GIT_CLONE_OPTIONS_VERSION );
56 cloneOptions.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
58 cloneOptions.checkout_opts.progress_payload =
this;
61 cloneOptions.fetch_opts.callbacks.payload =
this;
65 if( git_clone( &
m_repo,
m_URL.ToStdString().c_str(),
m_clonePath.ToStdString().c_str(), &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)