44 git_repository*
GetRepo()
const;
51 wxString GetCurrentBranchName()
const;
53 std::vector<wxString> GetBranchNames()
const;
61 std::vector<wxString> GetProjectDirs();
68 std::pair<std::set<wxString>,std::set<wxString>> GetDifferentFiles()
const;
93 wxString GetPassword();
94 GIT_CONN_TYPE GetConnType()
const;
98 void SetSSHKey(
const wxString& aSSHKey );
106 bool HasLocalCommits()
const;
109 bool HasPushAndPullRemote()
const;
112 void UpdateCurrentBranchInfo();
114 wxString GetGitRootDirectory()
const;
116 wxString GetRemotename()
const;
120 wxString GetRemoteNameOrDefault()
const;
124 wxString GetUpstreamShorthand()
const;
136 wxString GetProjectDir()
const;
143 return wxEmptyString;
158 int HandleSSHKeyAuthentication( git_cred** aOut,
const wxString& aUsername );
160 int HandlePlaintextAuthentication( git_cred** aOut,
const wxString& aUsername );
162 int HandleSSHAgentAuthentication( git_cred** aOut,
const wxString& aUsername );
166 const git_error* error = git_error_last();
168 if( error ==
nullptr )
169 return wxString(
"No error" );
171 return wxString( error->message );
230extern "C" APIEXPORT int update_cb(
const char* aRefname,
const git_oid* aFirst,
const git_oid* aSecond,
233 size_t aBytes,
void* aPayload );
238 const git_oid* aOID,
unsigned int aIsMerge,
void* aPayload );
240 unsigned int aAllowedTypes,
void* aPayload );
272 const std::function<
void(
const git_diff_delta& )>& aCallback );
std::mutex m_gitActionMutex
void updateConnectionType()
const wxString & GetRemote() const
friend class PROJECT_TREE_PANE
std::atomic< bool > m_cancel
bool WasAuthFailure() const
static wxString GetLastGitError()
static const unsigned KIGIT_CREDENTIAL_SSH_AGENT
void SetUsername(const wxString &aUsername)
git_repository * GetRepo() const
friend class GIT_CLONE_HANDLER
wxString GetNextPublicKey()
KIGIT_COMMON(git_repository *aRepo)
void SetProjectDir(const wxString &aProjectDir)
Set the project directory path, preserving any symlinks in the path.
std::vector< wxString > m_publicKeys
wxString GetUsername() const
friend class GIT_PUSH_HANDLER
friend class GIT_PULL_HANDLER
friend class LIBGIT_BACKEND
void SetCancelled(bool aCancel)
void SetPassword(const wxString &aPassword)
void SetRemote(const wxString &aRemote)
void SetRepo(git_repository *aRepo)
#define APIEXPORT
Macros which export functions from a DLL/DSO.
APIEXPORT int transfer_progress_cb(const git_transfer_progress *aStats, void *aPayload)
APIEXPORT int push_update_reference_cb(const char *aRefname, const char *aStatus, void *aPayload)
APIEXPORT int fetchhead_foreach_cb(const char *, const char *, const git_oid *aOID, unsigned int aIsMerge, void *aPayload)
APIEXPORT int credentials_cb(git_cred **aOut, const char *aUrl, const char *aUsername, unsigned int aAllowedTypes, void *aPayload)
APIEXPORT int push_transfer_progress_cb(unsigned int aCurrent, unsigned int aTotal, size_t aBytes, void *aPayload)
APIEXPORT int update_cb(const char *aRefname, const git_oid *aFirst, const git_oid *aSecond, void *aPayload)
APIEXPORT int progress_cb(const char *str, int len, void *data)
APIEXPORT void clone_progress_cb(const char *str, size_t len, size_t total, void *data)
git_tree * ResolveRefToTree(git_repository *aRepo, const wxString &aRef)
Resolve a string ref (branch name, short OID, full OID, tag) to its tree.
void CollectDiffDeltas(git_diff *aDiff, const std::function< void(const git_diff_delta &)> &aCallback)
Walk every delta in a computed diff, invoking aCallback once per delta.