KiCad PCB EDA Suite
|
#include <libgit_backend.h>
Public Member Functions | |
void | Init () override |
void | Shutdown () override |
bool | IsLibraryAvailable () override |
bool | Clone (GIT_CLONE_HANDLER *aHandler) override |
CommitResult | Commit (GIT_COMMIT_HANDLER *aHandler, const std::vector< wxString > &aFiles, const wxString &aMessage, const wxString &aAuthorName, const wxString &aAuthorEmail) override |
PushResult | Push (GIT_PUSH_HANDLER *aHandler) override |
bool | HasChangedFiles (GIT_STATUS_HANDLER *aHandler) override |
std::map< wxString, FileStatus > | GetFileStatus (GIT_STATUS_HANDLER *aHandler, const wxString &aPathspec) override |
wxString | GetCurrentBranchName (GIT_STATUS_HANDLER *aHandler) override |
void | UpdateRemoteStatus (GIT_STATUS_HANDLER *aHandler, const std::set< wxString > &aLocalChanges, const std::set< wxString > &aRemoteChanges, std::map< wxString, FileStatus > &aFileStatus) override |
wxString | GetWorkingDirectory (GIT_STATUS_HANDLER *aHandler) override |
wxString | GetWorkingDirectory (GIT_CONFIG_HANDLER *aHandler) override |
bool | GetConfigString (GIT_CONFIG_HANDLER *aHandler, const wxString &aKey, wxString &aValue) override |
bool | IsRepository (GIT_INIT_HANDLER *aHandler, const wxString &aPath) override |
InitResult | InitializeRepository (GIT_INIT_HANDLER *aHandler, const wxString &aPath) override |
bool | SetupRemote (GIT_INIT_HANDLER *aHandler, const RemoteConfig &aConfig) override |
BranchResult | SwitchToBranch (GIT_BRANCH_HANDLER *aHandler, const wxString &aBranchName) override |
bool | BranchExists (GIT_BRANCH_HANDLER *aHandler, const wxString &aBranchName) override |
bool | PerformFetch (GIT_PULL_HANDLER *aHandler, bool aSkipLock) override |
PullResult | PerformPull (GIT_PULL_HANDLER *aHandler) override |
void | PerformRevert (GIT_REVERT_HANDLER *aHandler) override |
git_repository * | GetRepositoryForFile (const char *aFilename) override |
int | CreateBranch (git_repository *aRepo, const wxString &aBranchName) override |
bool | RemoveVCS (git_repository *&aRepo, const wxString &aProjectPath, bool aRemoveGitDir, wxString *aErrors) override |
bool | AddToIndex (GIT_ADD_TO_INDEX_HANDLER *aHandler, const wxString &aFilePath) override |
bool | PerformAddToIndex (GIT_ADD_TO_INDEX_HANDLER *aHandler) override |
bool | RemoveFromIndex (GIT_REMOVE_FROM_INDEX_HANDLER *aHandler, const wxString &aFilePath) override |
void | PerformRemoveFromIndex (GIT_REMOVE_FROM_INDEX_HANDLER *aHandler) override |
Private Member Functions | |
PullResult | handleFastForward (GIT_PULL_HANDLER *aHandler) |
PullResult | handleMerge (GIT_PULL_HANDLER *aHandler, const git_annotated_commit **aMergeHeads, size_t aMergeHeadsCount) |
PullResult | handleRebase (GIT_PULL_HANDLER *aHandler, const git_annotated_commit **aMergeHeads, size_t aMergeHeadsCount) |
Definition at line 33 of file libgit_backend.h.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1234 of file libgit_backend.cpp.
References KIGIT_COMMON::GetRepo(), and GIT_ADD_TO_INDEX_HANDLER::m_filesToAdd.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 725 of file libgit_backend.cpp.
References KIGIT_REPO_MIXIN::GetRepo(), and lookup_branch_reference().
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 99 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), clone_progress_cb(), credentials_cb(), GIT_CLONE_HANDLER::GetClonePath(), KIGIT_REPO_MIXIN::GetCommon(), KIGIT_COMMON::m_gitActionMutex, KIGIT_COMMON::m_remote, KIGIT_REPO_MIXIN::ResetNextKey(), KIGIT_COMMON::SetRepo(), KIGIT_REPO_MIXIN::TestedTypes(), traceGit, and transfer_progress_cb().
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 148 of file libgit_backend.cpp.
References _, GIT_COMMIT_HANDLER::AddErrorString(), Error, KIGIT_COMMON::GetLastGitError(), KIGIT_COMMON::GetRepo(), and Success.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1168 of file libgit_backend.cpp.
References KIGIT_COMMON::GetLastGitError(), and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 521 of file libgit_backend.cpp.
References config, KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), result, and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 426 of file libgit_backend.cpp.
References KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 368 of file libgit_backend.cpp.
References GIT_STATUS_HANDLER::ConvertStatus(), FileStatus::filePath, KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), FileStatus::gitStatus, path, FileStatus::status, and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1144 of file libgit_backend.cpp.
References KIGIT_COMMON::GetLastGitError(), GIT_BUF_INIT, and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 506 of file libgit_backend.cpp.
References KIGIT_REPO_MIXIN::GetRepo().
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 491 of file libgit_backend.cpp.
References KIGIT_REPO_MIXIN::GetRepo().
|
private |
Definition at line 898 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), Error, FastForward, getFirstLineFromCommitMessage(), getFormattedCommitDate(), KIGIT_REPO_MIXIN::GetRemotename(), KIGIT_REPO_MIXIN::GetRepo(), CommitDetails::m_author, CommitDetails::m_date, GIT_PULL_HANDLER::m_fetchResults, CommitDetails::m_firstLine, CommitDetails::m_sha, path, and traceGit.
Referenced by PerformPull().
|
private |
Definition at line 1048 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), KIGIT_REPO_MIXIN::GetRepo(), MergeFailed, and Success.
Referenced by PerformPull().
|
private |
Definition at line 1061 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), KIGIT_REPO_MIXIN::GetRepo(), MergeFailed, and Success.
Referenced by PerformPull().
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 340 of file libgit_backend.cpp.
References KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 78 of file libgit_backend.cpp.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 567 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), AlreadyExists, Error, KIGIT_REPO_MIXIN::GetCommon(), KIGIT_COMMON::GetLastGitError(), IsRepository(), KIGIT_COMMON::SetRepo(), Success, and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 88 of file libgit_backend.cpp.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 553 of file libgit_backend.cpp.
Referenced by InitializeRepository().
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1259 of file libgit_backend.cpp.
References KIGIT_COMMON::GetRepo(), GIT_ADD_TO_INDEX_HANDLER::m_filesFailedToAdd, and GIT_ADD_TO_INDEX_HANDLER::m_filesToAdd.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 743 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), credentials_cb(), KIGIT_REPO_MIXIN::GetCommon(), KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), KIGIT_COMMON::m_gitActionMutex, progress_cb(), KIGIT_REPO_MIXIN::ResetNextKey(), KIGIT_COMMON::SetCancelled(), KIGIT_REPO_MIXIN::TestedTypes(), traceGit, and transfer_progress_cb().
Referenced by PerformPull().
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 805 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), config, Error, fetchhead_foreach_cb(), KIGIT_REPO_MIXIN::GetCommon(), KIGIT_REPO_MIXIN::GetRepo(), handleFastForward(), handleMerge(), handleRebase(), KIGIT_COMMON::m_gitActionMutex, MergeFailed, PerformFetch(), result, Success, traceGit, and UpToDate.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1323 of file libgit_backend.cpp.
References KIGIT_COMMON::GetRepo(), and GIT_REMOVE_FROM_INDEX_HANDLER::m_filesToRemove.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1100 of file libgit_backend.cpp.
References GIT_REVERT_HANDLER::m_filesToRevert, GIT_REVERT_HANDLER::m_repository, and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 265 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), credentials_cb(), Error, KIGIT_REPO_MIXIN::GetCommon(), KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), KIGIT_COMMON::m_gitActionMutex, progress_cb(), push_transfer_progress_cb(), KIGIT_REPO_MIXIN::ResetNextKey(), result, KIGIT_COMMON::SetCancelled(), Success, KIGIT_REPO_MIXIN::TestedTypes(), traceGit, transfer_progress_cb(), and update_cb().
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1298 of file libgit_backend.cpp.
References KIGIT_COMMON::GetRepo(), and GIT_REMOVE_FROM_INDEX_HANDLER::m_filesToRemove.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 1202 of file libgit_backend.cpp.
References RmDirRecursive(), and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 592 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), RemoteConfig::connType, KIGIT_REPO_MIXIN::GetCommon(), KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), KIGIT_COMMON::GIT_CONN_HTTPS, KIGIT_COMMON::GIT_CONN_SSH, RemoteConfig::password, KIGIT_COMMON::SetPassword(), KIGIT_COMMON::SetSSHKey(), KIGIT_COMMON::SetUsername(), RemoteConfig::sshKey, traceGit, RemoteConfig::url, and RemoteConfig::username.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 83 of file libgit_backend.cpp.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 675 of file libgit_backend.cpp.
References _, KIGIT_ERRORS::AddErrorString(), BranchNotFound, CheckoutFailed, Error, KIGIT_COMMON::GetLastGitError(), KIGIT_REPO_MIXIN::GetRepo(), lookup_branch_reference(), Success, and traceGit.
|
overridevirtual |
Implements GIT_BACKEND.
Definition at line 452 of file libgit_backend.cpp.
References KIGIT_REPO_MIXIN::GetRepo(), KIGIT_COMMON::GIT_STATUS_AHEAD, KIGIT_COMMON::GIT_STATUS_BEHIND, and KIGIT_COMMON::GIT_STATUS_CURRENT.