|
KiCad PCB EDA Suite
|
#include <git_commit_handler.h>
Public Types | |
| enum class | GIT_STATUS { GIT_STATUS_UNTRACKED , GIT_STATUS_CURRENT , GIT_STATUS_MODIFIED , GIT_STATUS_ADDED , GIT_STATUS_DELETED , GIT_STATUS_BEHIND , GIT_STATUS_AHEAD , GIT_STATUS_CONFLICTED , GIT_STATUS_IGNORED , GIT_STATUS_LAST } |
| enum class | GIT_CONN_TYPE { GIT_CONN_HTTPS = 0 , GIT_CONN_SSH , GIT_CONN_LOCAL , GIT_CONN_LAST } |
| using | CANCEL_TOKEN = std::shared_ptr<std::atomic<bool>> |
| One token per operation. | |
Public Member Functions | |
| GIT_COMMIT_HANDLER (git_repository *aRepo) | |
| virtual | ~GIT_COMMIT_HANDLER () |
| CommitResult | PerformCommit (const std::vector< wxString > &aFiles, const wxString &aMessage, const wxString &aAuthorName, const wxString &aAuthorEmail) |
| CommitResult | PerformAmend (const std::vector< wxString > &aFiles, const wxString &aMessage, const wxString &aAuthorName, const wxString &aAuthorEmail) |
| git_repository * | GetRepo () const |
| void | SetRepo (git_repository *aRepo) |
| wxString | GetCurrentBranchName () const |
| wxString | GetHeadCommitId () const |
| Full commit ID at HEAD, or empty for an unborn or missing HEAD. | |
| std::vector< KIGIT_BRANCH_INFO > | GetBranches () const |
| Local and remote branches with their tip commits. | |
| KIGIT_BRANCH_DETAIL | GetBranchDetail (const wxString &aBranch) const |
| std::vector< wxString > | GetProjectDirs () |
| Return a vector of project files in the repository. | |
| std::pair< std::set< wxString >, std::set< wxString > > | GetDifferentFiles () const |
| Return a pair of sets of files that differ locally from the remote repository The first set is files that have been committed locally but not pushed The second set is files that have been committed remotely but not pulled. | |
| wxString | GetUsername () const |
| wxString | GetPassword () |
| GIT_CONN_TYPE | GetConnType () const |
| void | SetConnType (GIT_CONN_TYPE aConnType) |
| For a remote whose address names no transport, the user picks one in the prompt. | |
| void | SetUsername (const wxString &aUsername) |
| void | SetPassword (const wxString &aPassword) |
| void | SetSSHKey (const wxString &aSSHKey) |
| wxString | GetSSHKey () const |
| The key the project was set up with, even when its file is gone, otherwise the first key offered. | |
| wxString | GetFirstOfferedSSHKey () const |
| The key the next attempt will try first, for the credential prompt to show. | |
| CREDENTIAL_IDENTITY | GetCredentialIdentity () const |
| bool | ApplyPromptedCredentials (const CREDENTIAL_IDENTITY &aFor, const PROMPTED_CREDENTIALS &aEntered) |
| Apply what the prompt collected, unless the session has moved to another remote since aFor was taken. | |
| std::atomic< unsigned > & | TestedTypes () |
| bool | HasLocalCommits () const |
| True when HEAD has commits its upstream does not, or has no upstream yet. | |
| bool | HasUpstreamCommits () const |
| True when the upstream branch has commits the current branch does not. | |
| bool | IsPullRebaseConfigured () const |
| True when the repository is set to rebase rather than merge when getting changes. | |
| bool | IsHeadDetached () const |
| True when HEAD points at a commit rather than a branch, as after checking out a tag. | |
| std::optional< size_t > | GetUnmergedCommitCount (const wxString &aBranch) const |
| Commits in aBranch that HEAD does not contain. No value when either cannot be read. | |
| bool | HasUncommittedTrackedChanges (bool *aReadOk=nullptr) const |
| std::vector< wxString > | GetRecentCommitMessages (size_t aMax) const |
| std::vector< KIGIT_COMMIT_INFO > | GetRecentCommits (size_t aMax=50, const KIGIT_HISTORY_FILTER &aFilter={}) const |
| KIGIT_COMMIT_DETAIL | GetCommitDetail (const wxString &aHash) const |
| wxString | GetLastCommitMessage () const |
| std::vector< KIGIT_STASH_INFO > | GetStashes () const |
| KIGIT_STASH_DETAIL | GetStashDetail (const wxString &aId) const |
| std::vector< KIGIT_TAG_INFO > | GetTags () const |
| KIGIT_TAG_DETAIL | GetTagDetail (const wxString &aName) const |
| bool | IsHeadUnborn () const |
| True while the repository has no commits, so HEAD names a branch that does not exist yet. | |
| bool | CreateBranch (const wxString &aName, const wxString &aFrom=wxEmptyString) |
| bool | StartUnbornBranch (const wxString &aName) |
| Point HEAD at a branch that does not exist yet, so the first commit creates it. | |
| bool | DeleteBranch (const wxString &aName) |
| bool | StashSave (const wxString &aMessage) |
| Set the uncommitted tracked changes aside as a new stash, as git stash push would. | |
| bool | StashApply (size_t aIndex) |
| bool | StashPop (size_t aIndex) |
| bool | StashDrop (size_t aIndex) |
| bool | CreateTag (const wxString &aName, const wxString &aMessage=wxEmptyString) |
| bool | DeleteTag (const wxString &aName) |
| bool | CheckoutTag (const wxString &aName) |
| bool | AddRemote (const wxString &aName, const wxString &aUrl) |
| bool | SetRemoteUrl (const wxString &aName, const wxString &aUrl) |
| bool | RemoveRemote (const wxString &aName) |
| bool | SetUserConfig (const wxString &aName, const wxString &aEmail) |
| bool | GetMergeConflicts (const wxString &aStageDir, wxString &aHeadOid, wxString &aTheirsOid, std::vector< KIGIT_CONFLICT_SIDES > &aConflicts, wxString &aError) |
| Recompute the merge in memory and extract each conflicted file's three versions into aStageDir, without touching the repository. | |
| RestoreResult | RestoreVersion (const wxString &aCommitHash, KIGIT_ERROR_MESSAGE &aError) |
| Restore the project as it was at aCommitHash, recorded as a new commit on top of the current head. | |
| bool | DiscardChanges (const std::vector< wxString > &aPaths, wxString &aError) |
| Put the given working directory relative paths back to their committed state. | |
| bool | IsPathInHead (const wxString &aPath) |
| True when the working directory relative path exists in the HEAD commit's tree. | |
| bool | IsPathConflicted (const wxString &aPath) const |
| True while aPath is one of the files a merge or rebase stopped on. | |
| bool | IsOperationInProgress () const |
| True while a merge, rebase, cherry-pick or revert is in progress, which refuses commits. | |
| GitOperation | OperationInProgress () const |
| Which operation that is, so the panel can name it. | |
| bool | AbandonOperation (wxString &aError) |
| Drop that operation and return to the last commit. The caller holds the action lock. | |
| MergeCommitResult | CreateMergedCommit (const wxString &aExpectedHeadOid, const wxString &aTheirsOid, const std::vector< std::pair< wxString, wxString > > &aResolvedFiles, KIGIT_ERROR_MESSAGE &aError) |
| Redo the merge with each conflicted path replaced by its resolved file, then commit and check out. | |
| bool | HasPushAndPullRemote () const |
| void | UpdateCurrentBranchInfo () |
| void | SyncRemoteUrl (const wxString &aRawUrl) |
| Bind the session to the URL a transfer is about to connect to. | |
| void | FollowRewrittenUrl (const wxString &aRawUrl) |
| Bind the session to a URL that url.insteadOf rewrote, keeping the username, password and key entered for the original. | |
| wxString | GetGitRootDirectory () const |
| wxString | GetRemotename () const |
| std::vector< std::pair< wxString, wxString > > | GetRemotes () const |
| Returns every remote as a (name, URL) pair. | |
| wxDateTime | GetLastFetchTime () const |
| std::pair< int, int > | GetWorkingTreeLineStats (const std::set< wxString > &aPaths) const |
| wxString | GetRemoteNameOrDefault () const |
| Returns GetRemotename() when non-empty, otherwise "origin". | |
| void | SetProjectDir (const wxString &aProjectDir) |
| Keep symlinks in the repository path so Git status paths match the project tree. | |
| wxString | GetProjectDir () const |
| Return the path set by SetProjectDir(), or the repository's working directory. | |
| std::optional< wxString > | GetProjectPrefix () const |
| Project folder relative to the repository, with a trailing slash. | |
| void | SetAttachError (const wxString &aError, const wxString &aTrustCommand=wxEmptyString) |
| Why binding a repository last failed, for the panels to show. Empty on success. | |
| const wxString & | GetAttachError () const |
| const wxString & | GetAttachTrustCommand () const |
| The command that trusts a repository another user owns, when that is why attaching failed. | |
| void | ResetNextKey () |
| wxString | GetNextPublicKey () |
| By value, so the caller never holds a pointer into the vector. | |
| void | SetRemote (const wxString &aRemote) |
| wxString | GetRemote () const |
| int | HandleSSHKeyAuthentication (git_cred **aOut, const wxString &aUsername, KIGIT_AUTH_ATTEMPT &aAttempt) |
| Offer the agent's keys once, then the next key file, recording in aAttempt which file was offered. | |
| int | HandlePlaintextAuthentication (git_cred **aOut, const wxString &aUsername) |
| int | HandleSSHAgentAuthentication (git_cred **aOut, const wxString &aUsername) |
| bool | IsShuttingDown () const |
| Background timers ask this before starting work of their own. | |
| void | SetShuttingDown (bool aCancel) |
| Stop the operation running now and keep later ones from starting. | |
| int | SSHPortFor (const wxString &aHost) const |
| The SSH port the session's remote names for aHost, 22 when it names none, or -1 when the remote is on another host or its port is not valid. | |
| std::unique_lock< std::mutex > | TryLockAction () |
| std::unique_lock< std::mutex > | TryLockActionFor (std::chrono::milliseconds aWait) |
| TryLockAction that keeps trying for aWait before giving up. | |
| std::unique_lock< std::mutex > | LockAction () |
| void | AddRefreshListener (void *aOwner, std::function< void()> aCallback) |
| void | RemoveRefreshListener (void *aOwner) |
| void | NotifyRefreshListeners () |
| const std::vector< wxString > & | GetErrorStrings () const |
| wxString | GetErrorString () |
| KIGIT_ERROR_MESSAGE | PopError () |
| Take the newest error with its details. Both are empty when none is queued. | |
| void | AddError (const wxString &aSummary, const wxString &aDetails) |
| A summary the user can act on, with the raw text that explains it kept apart for the details. | |
| void | AddError (const KIGIT_ERROR_MESSAGE &aMessage) |
| void | AddGitError (const wxString &aSummary) |
| Queue the summary with libgit2's last error as its details. | |
| void | AddErrorString (const wxString aErrorString) |
| void | AddErrorString (const std::string aErrorString) |
Static Public Member Functions | |
| static REMOTE_URL | ParseRemoteURL (const wxString &aURL) |
| static wxString | GetLastGitError () |
| libgit2's last message, without credentials from any URL it quotes, so it is safe to show or trace. | |
| static KIGIT_ERROR_INFO | GetLastGitErrorInfo (int aCode) |
| The error libgit2 holds for a call that returned aCode. | |
| static CANCEL_TOKEN | NewCancelToken () |
Static Public Attributes | |
| static constexpr std::chrono::milliseconds | ACTION_LOCK_WAIT { 2000 } |
| Long enough for a status read to finish, short enough that a window does not look hung. | |
Protected Attributes | |
| git_repository * | m_repo |
| wxString | m_projectDir |
| wxString | m_projectPath |
| wxString | m_attachError |
| wxString | m_attachTrustCommand |
| GIT_CONN_TYPE | m_connType |
| wxString | m_remote |
| wxString | m_urlUsername |
| wxString | m_hostname |
| int | m_port = 0 |
| wxString | m_username |
| wxString | m_password |
| std::atomic< unsigned > | m_testedTypes |
| std::mutex | m_gitActionMutex |
| std::mutex | m_credentialsMutex |
| Serializes the credential fields between the UI thread and the authentication callback's worker thread. | |
| std::vector< std::pair< void *, std::function< void()> > > | m_refreshListeners |
Private Member Functions | |
| std::optional< KIGIT_AHEAD_BEHIND > | compareRefs (const git_reference *aBranch, const git_reference *aBase) const |
| Count commits unique to aBranch and aBase. No value if the history cannot be read. | |
| CANCEL_TOKEN | ActiveCancelToken () const |
| wxString | remoteNameWithoutUpstream () const |
| Remote to use when HEAD names no upstream, empty when several remotes leave it ambiguous. | |
| void | updatePublicKeys () |
| void | rebuildPublicKeysUnlocked () |
| Rebuild m_publicKeys as the project key, when offerable, then the discovered keys, and restart from the first. | |
| void | updateConnectionType () |
| void | updateConnectionTypeUnlocked () |
| Body of updateConnectionType, for callers that already hold m_credentialsMutex. | |
Private Attributes | |
| std::vector< wxString > | m_discoveredKeys |
| std::vector< wxString > | m_publicKeys |
| wxString | m_publicKeysHost |
| wxString | m_projectSSHKey |
| int | m_nextPublicKey |
| bool | m_secretFetched |
| std::mutex | m_operationMutex |
| Guarded together, so a shutdown cannot miss an operation registering itself at the same moment. | |
| CANCEL_TOKEN | m_activeCancel |
| bool | m_shutdown = false |
| std::vector< wxString > | m_errorStrings |
| std::vector< wxString > | m_errorDetails |
| One per entry in m_errorStrings. | |
Static Private Attributes | |
| static const unsigned | KIGIT_CREDENTIAL_SSH_AGENT = 1u << ( sizeof( unsigned ) * 8 - 1 ) |
Definition at line 34 of file git_commit_handler.h.
|
inherited |
One token per operation.
Born uncancelled, so nothing has to be reset before an operation starts and one operation's cancel cannot reach another.
Definition at line 614 of file kicad_git_common.h.
|
stronginherited |
| Enumerator | |
|---|---|
| GIT_CONN_HTTPS | |
| GIT_CONN_SSH | |
| GIT_CONN_LOCAL | |
| GIT_CONN_LAST | |
Definition at line 289 of file kicad_git_common.h.
|
stronginherited |
| Enumerator | |
|---|---|
| GIT_STATUS_UNTRACKED | |
| GIT_STATUS_CURRENT | |
| GIT_STATUS_MODIFIED | |
| GIT_STATUS_ADDED | |
| GIT_STATUS_DELETED | |
| GIT_STATUS_BEHIND | |
| GIT_STATUS_AHEAD | |
| GIT_STATUS_CONFLICTED | |
| GIT_STATUS_IGNORED | |
| GIT_STATUS_LAST | |
Definition at line 275 of file kicad_git_common.h.
| GIT_COMMIT_HANDLER::GIT_COMMIT_HANDLER | ( | git_repository * | aRepo | ) |
Definition at line 23 of file git_commit_handler.cpp.
References git_repository, and KIGIT_COMMON::KIGIT_COMMON().
|
virtual |
Definition at line 28 of file git_commit_handler.cpp.
|
inherited |
Drop that operation and return to the last commit. The caller holds the action lock.
Definition at line 1658 of file kicad_git_common.cpp.
References GIT_BACKEND::AbandonOperation(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineprivateinherited |
Definition at line 731 of file kicad_git_common.h.
References m_activeCancel, and m_operationMutex.
Referenced by GetRecentCommits().
|
inlineinherited |
Definition at line 76 of file kicad_git_errors.h.
References AddError(), KIGIT_ERROR_MESSAGE::details, and KIGIT_ERROR_MESSAGE::summary.
Referenced by AddError().
|
inherited |
A summary the user can act on, with the raw text that explains it kept apart for the details.
Both are shown, so any credentials in a URL inside either one are removed here.
Definition at line 27 of file kicad_git_errors.cpp.
References m_errorDetails, m_errorStrings, and KIGIT::StripEmbeddedUserinfo().
Referenced by AddErrorString(), AddErrorString(), AddGitError(), adoptRemoteHistory(), LIBGIT_BACKEND::Amend(), LIBGIT_BACKEND::Commit(), LIBGIT_BACKEND::handleFastForward(), LIBGIT_BACKEND::handleMerge(), LIBGIT_BACKEND::InitializeRepository(), rebaseOnto(), reportRemoteLookupFailure(), KIGIT_REPO_MIXIN::ReportTransferFailure(), LIBGIT_BACKEND::SetupRemote(), and LIBGIT_BACKEND::SwitchToBranch().
|
inlineinherited |
Definition at line 86 of file kicad_git_errors.h.
References AddError().
|
inlineinherited |
Definition at line 81 of file kicad_git_errors.h.
References AddError().
Referenced by adoptRemoteHistory(), LIBGIT_BACKEND::Amend(), LIBGIT_BACKEND::Clone(), LIBGIT_BACKEND::Commit(), LIBGIT_BACKEND::handleFastForward(), LIBGIT_BACKEND::handleMerge(), LIBGIT_BACKEND::handleRebase(), LIBGIT_BACKEND::PerformFetch(), LIBGIT_BACKEND::PerformPull(), LIBGIT_BACKEND::Push(), rebaseOnto(), LIBGIT_BACKEND::SetupRemote(), and LIBGIT_BACKEND::SwitchToBranch().
|
inherited |
Queue the summary with libgit2's last error as its details.
Definition at line 34 of file kicad_git_errors.cpp.
References AddError(), and KIGIT_COMMON::GetLastGitError().
Referenced by adoptRemoteHistory(), LIBGIT_BACKEND::Amend(), LIBGIT_BACKEND::Commit(), LIBGIT_BACKEND::handleFastForward(), LIBGIT_BACKEND::handleMerge(), LIBGIT_BACKEND::PerformPull(), and rebaseOnto().
|
inherited |
Definition at line 1679 of file kicad_git_common.cpp.
References m_refreshListeners.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 1568 of file kicad_git_common.cpp.
References GIT_BACKEND::AddRemote(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PANEL_GIT_REMOTES::onAddRemote().
|
inherited |
Apply what the prompt collected, unless the session has moved to another remote since aFor was taken.
The check and the apply share one critical section, so a background fetch cannot slip between them. The per-attempt state is reset with it, so the next transfer starts over with these. Returns false, leaving everything alone, when the identity moved.
Definition at line 1928 of file kicad_git_common.cpp.
References KIGIT_COMMON::CREDENTIAL_IDENTITY::connType, KIGIT_COMMON::PROMPTED_CREDENTIALS::connType, m_connType, m_credentialsMutex, m_nextPublicKey, m_password, m_projectSSHKey, m_remote, m_secretFetched, m_testedTypes, m_username, KIGIT_COMMON::PROMPTED_CREDENTIALS::password, rebuildPublicKeysUnlocked(), KIGIT_COMMON::CREDENTIAL_IDENTITY::remote, KIGIT_COMMON::PROMPTED_CREDENTIALS::sshKey, KIGIT_COMMON::CREDENTIAL_IDENTITY::username, and KIGIT_COMMON::PROMPTED_CREDENTIALS::username.
Referenced by KIGIT::PromptForCredentials().
|
inherited |
Definition at line 1562 of file kicad_git_common.cpp.
References GIT_BACKEND::CheckoutTag(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PANEL_GIT_TAGS::onCheckoutTag().
|
privateinherited |
Count commits unique to aBranch and aBase. No value if the history cannot be read.
Definition at line 861 of file kicad_git_common.cpp.
References KIGIT_AHEAD_BEHIND::ahead, KIGIT_AHEAD_BEHIND::behind, m_repo, and result.
Referenced by GetBranchDetail(), GetUnmergedCommitCount(), HasLocalCommits(), HasUpstreamCommits(), and LIBGIT_BACKEND.
|
inherited |
Definition at line 1448 of file kicad_git_common.cpp.
References KIGIT::BranchNameError(), GIT_BACKEND::CreateBranch(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), moveToNewBranch(), and PANEL_GIT_BRANCHES::onNewBranch().
|
inherited |
Redo the merge with each conflicted path replaced by its resolved file, then commit and check out.
All or nothing.
aTheirsOid pins the remote commit, so a background fetch cannot change what gets merged. An empty resolved-file path records "the file is deleted". A failure leaves its reason in aError's details, and a summary only when the next step is known.
Definition at line 1671 of file kicad_git_common.cpp.
References GIT_BACKEND::CreateMergedCommit(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 1487 of file kicad_git_common.cpp.
References GIT_BACKEND::CreateTag(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PANEL_GIT_TAGS::onNewTag().
|
inherited |
Definition at line 1457 of file kicad_git_common.cpp.
References GIT_BACKEND::DeleteBranch(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), dropNewBranch(), and moveToNewBranch().
|
inherited |
Definition at line 1556 of file kicad_git_common.cpp.
References GIT_BACKEND::DeleteTag(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), and PANEL_GIT_TAGS::onDeleteTag().
|
inherited |
Put the given working directory relative paths back to their committed state.
A path that is not in HEAD keeps its file and loses its staged entry.
Definition at line 1598 of file kicad_git_common.cpp.
References GIT_BACKEND::DiscardChanges(), GetGitBackend(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Bind the session to a URL that url.insteadOf rewrote, keeping the username, password and key entered for the original.
Definition at line 2101 of file kicad_git_common.cpp.
References m_credentialsMutex, m_password, m_secretFetched, m_username, and SyncRemoteUrl().
Referenced by DIALOG_GIT_REPOSITORY::OnTestClick().
|
inlineinherited |
Definition at line 564 of file kicad_git_common.h.
References m_attachError.
|
inlineinherited |
The command that trusts a repository another user owns, when that is why attaching failed.
Definition at line 567 of file kicad_git_common.h.
References m_attachTrustCommand.
|
inherited |
Definition at line 599 of file kicad_git_common.cpp.
References compareRefs(), KIGIT::DecodeRepoText(), m_repo, and message.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Local and remote branches with their tip commits.
Symbolic aliases are omitted. Callers choose the display order.
Definition at line 524 of file kicad_git_common.cpp.
References KIGIT::DecodeRepoText(), GetLastGitError(), info, m_repo, and traceGit.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PROJECT_TREE_PANE::onGitSwitchBranch(), GIT_ADVANCED_DIALOG::populateTopBar(), and GIT_COMMIT_PANE::RefreshFileList().
|
inherited |
Definition at line 1185 of file kicad_git_common.cpp.
References KIGIT_COMMIT_FILE::added, KIGIT_COMMIT_FILE::binary, KIGIT::DecodeRepoText(), delta, m_repo, message, KIGIT_COMMIT_FILE::oldPath, KIGIT_COMMIT_FILE::path, KIGIT_COMMIT_FILE::removed, and KIGIT_COMMIT_FILE::status.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 2123 of file kicad_git_common.cpp.
References m_connType, and m_credentialsMutex.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 1921 of file kicad_git_common.cpp.
References m_connType, m_credentialsMutex, m_remote, and m_username.
Referenced by KIGIT::PromptForCredentials().
|
inherited |
Definition at line 131 of file kicad_git_common.cpp.
References m_repo, and traceGit.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PANEL_GIT_BRANCHES::onForcePush(), GIT_ADVANCED_DIALOG::populateTopBar(), TEXT_EVAL_VCS::ReadBranch(), GIT_COMMIT_PANE::RefreshFileList(), and GIT_COMMIT_PANE::submitPush().
|
inherited |
Return a pair of sets of files that differ locally from the remote repository The first set is files that have been committed locally but not pushed The second set is files that have been committed remotely but not pulled.
Definition at line 724 of file kicad_git_common.cpp.
References KIGIT::CollectDiffDeltas(), GetLastGitError(), IsShuttingDown(), m_repo, and traceGit.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Definition at line 49 of file kicad_git_errors.h.
References _, m_errorDetails, and m_errorStrings.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Definition at line 44 of file kicad_git_errors.h.
References m_errorStrings.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
The key the next attempt will try first, for the credential prompt to show.
Empty when no key file can be offered.
Definition at line 1904 of file kicad_git_common.cpp.
References KIGIT::IsOfferableSSHKey(), m_credentialsMutex, m_projectSSHKey, and m_publicKeys.
Referenced by initialSSHKey().
|
inherited |
Definition at line 2015 of file kicad_git_common.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), GIT_COMMIT_PANE::discardFile(), and GIT_ADVANCED_DIALOG::populateTopBar().
|
inherited |
Full commit ID at HEAD, or empty for an unborn or missing HEAD.
The caller holds the action lock when capturing this alongside the branch name for a later operation.
Definition at line 169 of file kicad_git_common.cpp.
References m_repo.
Referenced by PANEL_GIT_BRANCHES::onForcePush(), and GIT_COMMIT_PANE::submitPush().
|
inherited |
Definition at line 221 of file kicad_git_common.cpp.
References KIGIT::DecodeRepoText(), m_repo, and message.
Referenced by GIT_COMMIT_PANE::BeginAmend().
|
inherited |
Definition at line 339 of file kicad_git_common.cpp.
References m_repo.
Referenced by BOOST_AUTO_TEST_CASE().
|
staticinherited |
libgit2's last message, without credentials from any URL it quotes, so it is safe to show or trace.
Definition at line 2159 of file kicad_git_common.cpp.
References KIGIT::StripEmbeddedUserinfo().
Referenced by LIBGIT_BACKEND::AbandonOperation(), HISTORY_LOCK_MANAGER::acquireIndexLock(), KIGIT_ERRORS::AddGitError(), adoptRemoteHistory(), COMMIT_STAGING::Begin(), COMMIT_STAGING::BuildTree(), KIGIT::CompareRefs(), LIBGIT_BACKEND::CreateBranch(), LIBGIT_BACKEND::CreateMergedCommit(), credentials_cb(), describeSignatureFailure(), LIBGIT_BACKEND::DiscardChanges(), ensureMergeDriverConfig(), GetBranches(), LIBGIT_BACKEND::GetConfigString(), LIBGIT_BACKEND::GetCurrentBranchName(), getDefaultAuthorAndEmail(), GetDifferentFiles(), LIBGIT_BACKEND::GetFileStatus(), GetProjectDirs(), GetRemotename(), LIBGIT_BACKEND::GetRepositoryForFile(), LIBGIT_BACKEND::handleFastForward(), HandleSSHAgentAuthentication(), HandleSSHKeyAuthentication(), LIBGIT_BACKEND::hasUnstagedChanges(), LIBGIT_BACKEND::Init(), LIBGIT_BACKEND::InitializeRepository(), moveToNewBranch(), HISTORY_LOCK_MANAGER::openRepository(), publishPreparedCommit(), rebaseOnto(), KIGIT::RegisterMergeDriver(), remoteNameWithoutUpstream(), reportRemoteLookupFailure(), KIGIT::ResolveRefToTree(), LIBGIT_BACKEND::RestoreVersion(), setConfigIfMissing(), PROJECT_TREE_PANE::switchGitBranch(), SwitchProjectToBranch(), and LIBGIT_BACKEND::SwitchToBranch().
|
staticinherited |
The error libgit2 holds for a call that returned aCode.
Read it straight after the call, because the callbacks and cleanup that follow can replace it.
Definition at line 2171 of file kicad_git_common.cpp.
References info.
Referenced by LIBGIT_BACKEND::Clone(), DIALOG_GIT_REPOSITORY::OnTestClick(), LIBGIT_BACKEND::PerformFetch(), LIBGIT_BACKEND::Push(), and LIBGIT_BACKEND::SetupRemote().
|
inherited |
Recompute the merge in memory and extract each conflicted file's three versions into aStageDir, without touching the repository.
aHeadOid pins HEAD for CreateMergedCommit.
Definition at line 1664 of file kicad_git_common.cpp.
References GetGitBackend(), GIT_BACKEND::GetMergeConflicts(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::resolvePullConflicts().
|
inherited |
By value, so the caller never holds a pointer into the vector.
Definition at line 1998 of file kicad_git_common.cpp.
References KIGIT::IsOfferableSSHKey(), m_credentialsMutex, m_nextPublicKey, and m_publicKeys.
Referenced by BOOST_AUTO_TEST_CASE(), and HandleSSHKeyAuthentication().
|
inherited |
Definition at line 180 of file kicad_git_common.cpp.
References KIPLATFORM::SECRETS::GetSecret(), GIT_CONN_LOCAL, m_connType, m_credentialsMutex, m_password, m_remote, m_secretFetched, and m_username.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), HandlePlaintextAuthentication(), HandleSSHKeyAuthentication(), and PROJECT_TREE_PANE::onGitRemoteSettings().
|
inherited |
Return the path set by SetProjectDir(), or the repository's working directory.
Definition at line 105 of file kicad_git_common.cpp.
References m_projectDir, and m_repo.
Referenced by GetProjectPrefix().
|
inherited |
Return a vector of project files in the repository.
Sorted by the depth of the project file in the directory tree
Definition at line 655 of file kicad_git_common.cpp.
References GetLastGitError(), m_repo, and traceGit.
Referenced by BOOST_AUTO_TEST_CASE(), and KICAD_MANAGER_CONTROL::NewFromRepository().
|
inherited |
Project folder relative to the repository, with a trailing slash.
An empty string means the repository root. No value means the folder is unknown.
Definition at line 122 of file kicad_git_common.cpp.
References GetProjectDir(), m_projectPath, m_repo, and KIGIT::PROJECT_GIT_UTILS::ProjectPrefix().
Referenced by BuildGitChangeEntries(), KIGIT::PROJECT_GIT_UTILS::LfsRefusal(), KIGIT::PROJECT_GIT_UTILS::ProjectUsesGitLfs(), and LIBGIT_BACKEND::RestoreVersion().
|
inherited |
Definition at line 990 of file kicad_git_common.cpp.
References KIGIT::DecodeRepoText(), m_repo, message, and text.
Referenced by BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::RefreshFileList().
|
inherited |
Definition at line 1081 of file kicad_git_common.cpp.
References ActiveCancelToken(), KIGIT_HISTORY_FILTER::branch, cancel, KIGIT::DecodeRepoText(), info, IsShuttingDown(), m_repo, KIGIT_HISTORY_FILTER::path, path, and KIGIT_HISTORY_FILTER::search.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PANEL_GIT_HISTORY::onHistoryScrollTick(), and PANEL_GIT_HISTORY::Populate().
|
inlineinherited |
Definition at line 592 of file kicad_git_common.h.
References m_credentialsMutex, and m_remote.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), LIBGIT_BACKEND::Clone(), and resolveMissingRemote().
|
inherited |
Definition at line 1836 of file kicad_git_common.cpp.
References GetLastGitError(), m_repo, remoteNameWithoutUpstream(), and traceGit.
Referenced by BOOST_AUTO_TEST_CASE(), GetRemoteNameOrDefault(), and UpdateCurrentBranchInfo().
|
inherited |
Returns GetRemotename() when non-empty, otherwise "origin".
Centralizes the fallback policy used by push/pull/fetch paths.
Definition at line 1772 of file kicad_git_common.cpp.
References GetRemotename().
Referenced by adoptRemoteHistory(), HasPushAndPullRemote(), PANEL_GIT_BRANCHES::onForcePush(), LIBGIT_BACKEND::PerformFetch(), LIBGIT_BACKEND::PerformPull(), LIBGIT_BACKEND::Push(), and resolveMissingRemote().
|
inherited |
Returns every remote as a (name, URL) pair.
Definition at line 1398 of file kicad_git_common.cpp.
References m_repo, name, and KIGIT::StripEmbeddedUserinfo().
Referenced by BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 99 of file kicad_git_common.cpp.
References git_repository, and m_repo.
Referenced by LIBGIT_BACKEND::Amend(), amendRefusal(), GIT_COMMIT_PANE::BeginAmend(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), ChangedTrackedFilesOutsideProject(), LIBGIT_BACKEND::Commit(), GIT_COMMIT_PANE::doCommit(), PROJECT_TREE_PANE::gitRepo(), KIGIT::PROJECT_GIT_UTILS::LfsRefusal(), MaterializeCommitFile(), MaterializeWorkingFile(), KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitRemoteSettings(), KIGIT::PROJECT_GIT_UTILS::ProjectUsesGitLfs(), KIGIT::ReadGitIdentity(), ReadGitWorktreeStatus(), resolveMissingRemote(), and LIBGIT_BACKEND::RestoreVersion().
|
inherited |
The key the project was set up with, even when its file is gone, otherwise the first key offered.
Empty when none is known.
Definition at line 1893 of file kicad_git_common.cpp.
References m_credentialsMutex, m_projectSSHKey, and m_publicKeys.
|
inherited |
Definition at line 359 of file kicad_git_common.cpp.
References KIGIT::CollectDiffDeltas(), KIGIT::DecodeRepoText(), m_repo, message, and path.
Referenced by BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 1338 of file kicad_git_common.cpp.
References m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 1493 of file kicad_git_common.cpp.
References KIGIT::DecodeRepoText(), m_repo, and message.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GetTags().
|
inherited |
Definition at line 1352 of file kicad_git_common.cpp.
References KIGIT::DecodeRepoText(), GetTagDetail(), info, and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Commits in aBranch that HEAD does not contain. No value when either cannot be read.
Definition at line 964 of file kicad_git_common.cpp.
References compareRefs(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Definition at line 310 of file kicad_git_common.h.
References m_credentialsMutex, and m_username.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PROJECT_TREE_PANE::onGitRemoteSettings().
|
inherited |
Definition at line 472 of file kicad_git_common.cpp.
References delta, m_repo, and path.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::RefreshFileList().
|
inherited |
Definition at line 2585 of file kicad_git_common.cpp.
References GetPassword(), and m_testedTypes.
Referenced by credentials_cb().
|
inherited |
Definition at line 2596 of file kicad_git_common.cpp.
References GetLastGitError(), KIGIT_CREDENTIAL_SSH_AGENT, m_testedTypes, and traceGit.
Referenced by HandleSSHKeyAuthentication().
|
inherited |
Offer the agent's keys once, then the next key file, recording in aAttempt which file was offered.
Definition at line 2543 of file kicad_git_common.cpp.
References KIGIT_AUTH_ATTEMPT::agentTried, GetLastGitError(), GetNextPublicKey(), GetPassword(), HandleSSHAgentAuthentication(), KIGIT_AUTH_ATTEMPT::keysTried, KIGIT_CREDENTIAL_SSH_AGENT, m_testedTypes, and traceGit.
Referenced by credentials_cb().
|
inherited |
True when HEAD has commits its upstream does not, or has no upstream yet.
False for a detached or unborn HEAD.
Definition at line 891 of file kicad_git_common.cpp.
References compareRefs(), IsHeadDetached(), m_repo, and result.
Referenced by amendRefusal(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::RefreshFileList().
|
inherited |
Definition at line 1715 of file kicad_git_common.cpp.
References GetRemoteNameOrDefault(), m_repo, and traceGit.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), GIT_ADVANCED_DIALOG::onFetch(), PANEL_GIT_BRANCHES::onForcePush(), GIT_COMMIT_PANE::RefreshFileList(), and GIT_COMMIT_PANE::submitPush().
|
inherited |
Definition at line 243 of file kicad_git_common.cpp.
References m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and ReadGitWorktreeStatus().
|
inherited |
True when the upstream branch has commits the current branch does not.
Definition at line 941 of file kicad_git_common.cpp.
References compareRefs(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::RefreshFileList().
|
inherited |
True when HEAD points at a commit rather than a branch, as after checking out a tag.
Definition at line 918 of file kicad_git_common.cpp.
References m_repo.
Referenced by amendRefusal(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), HasLocalCommits(), PANEL_GIT_BRANCHES::onForcePush(), PANEL_GIT_HISTORY::onRestoreVersion(), and GIT_COMMIT_PANE::RefreshFileList().
|
inherited |
True while the repository has no commits, so HEAD names a branch that does not exist yet.
Definition at line 1430 of file kicad_git_common.cpp.
References m_repo.
Referenced by amendRefusal(), BOOST_AUTO_TEST_CASE(), moveToNewBranch(), and StartUnbornBranch().
|
inherited |
True while a merge, rebase, cherry-pick or revert is in progress, which refuses commits.
Definition at line 1630 of file kicad_git_common.cpp.
References m_repo.
Referenced by amendRefusal(), BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::RefreshFileList().
|
inherited |
True while aPath is one of the files a merge or rebase stopped on.
Definition at line 1610 of file kicad_git_common.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::discardFile().
|
inherited |
True when the working directory relative path exists in the HEAD commit's tree.
Definition at line 1604 of file kicad_git_common.cpp.
References GetGitBackend(), GIT_BACKEND::IsPathInHead(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), GIT_COMMIT_PANE::discardFile(), and MaterializeWorkingFile().
|
inherited |
True when the repository is set to rebase rather than merge when getting changes.
Definition at line 924 of file kicad_git_common.cpp.
References config, and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::resolvePullConflicts().
|
inlineinherited |
Background timers ask this before starting work of their own.
Definition at line 654 of file kicad_git_common.h.
References m_operationMutex, and m_shutdown.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), GetDifferentFiles(), and GetRecentCommits().
|
inlineinherited |
Definition at line 686 of file kicad_git_common.h.
References m_gitActionMutex.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlinestaticinherited |
Definition at line 616 of file kicad_git_common.h.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and KIGIT_TRANSFER::Start().
|
inherited |
Definition at line 1695 of file kicad_git_common.cpp.
References m_refreshListeners, and registered.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Which operation that is, so the panel can name it.
Definition at line 1636 of file kicad_git_common.cpp.
References CherryPick, m_repo, Merge, None, Other, Rebase, and Revert.
Referenced by BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::RefreshFileList().
|
staticinherited |
Definition at line 2418 of file kicad_git_common.cpp.
References decodePercent(), findUserinfoAt(), GIT_CONN_HTTPS, GIT_CONN_SSH, parsePort(), parseScpAddress(), and result.
Referenced by PROJECT::AttachGitRepository(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DIALOG_GIT_CREDENTIALS::DIALOG_GIT_CREDENTIALS(), DIALOG_GIT_REPOSITORY::extractClipboardData(), DIALOG_GIT_REPOSITORY::GetUsername(), KICAD_MANAGER_CONTROL::NewFromRepository(), KIGIT::PromptForCredentials(), saveAcceptedRemoteSettings(), LIBGIT_BACKEND::SetupRemote(), SyncRemoteUrl(), DIALOG_GIT_REPOSITORY::updateAuthControls(), updateConnectionTypeUnlocked(), and DIALOG_GIT_REPOSITORY::updateURLData().
| CommitResult GIT_COMMIT_HANDLER::PerformAmend | ( | const std::vector< wxString > & | aFiles, |
| const wxString & | aMessage, | ||
| const wxString & | aAuthorName, | ||
| const wxString & | aAuthorEmail ) |
Definition at line 41 of file git_commit_handler.cpp.
References GIT_BACKEND::Amend(), and GetGitBackend().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::finishCommit().
| CommitResult GIT_COMMIT_HANDLER::PerformCommit | ( | const std::vector< wxString > & | aFiles, |
| const wxString & | aMessage, | ||
| const wxString & | aAuthorName, | ||
| const wxString & | aAuthorEmail ) |
Definition at line 32 of file git_commit_handler.cpp.
References GIT_BACKEND::Commit(), and GetGitBackend().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GIT_COMMIT_PANE::finishCommit().
|
inlineinherited |
Take the newest error with its details. Both are empty when none is queued.
Definition at line 61 of file kicad_git_errors.h.
References m_errorDetails, m_errorStrings, and message.
Referenced by GIT_COMMIT_PANE::finishCommit(), moveToNewBranch(), KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitRemoteSettings(), PROJECT_TREE_PANE::onGitSyncTimer(), and SwitchProjectToBranch().
|
privateinherited |
Rebuild m_publicKeys as the project key, when offerable, then the discovered keys, and restart from the first.
The caller holds m_credentialsMutex.
Definition at line 1980 of file kicad_git_common.cpp.
References KIGIT::IsOfferableSSHKey(), KIGIT::IsSameSSHKey(), m_discoveredKeys, m_nextPublicKey, m_projectSSHKey, m_publicKeys, and traceGit.
Referenced by ApplyPromptedCredentials(), SetSSHKey(), and updatePublicKeys().
|
privateinherited |
Remote to use when HEAD names no upstream, empty when several remotes leave it ambiguous.
Definition at line 1783 of file kicad_git_common.cpp.
References GetLastGitError(), m_repo, and traceGit.
Referenced by GetRemotename().
|
inherited |
Definition at line 1685 of file kicad_git_common.cpp.
References m_refreshListeners.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Definition at line 1580 of file kicad_git_common.cpp.
References GetGitBackend(), m_repo, and GIT_BACKEND::RemoveRemote().
Referenced by BOOST_AUTO_TEST_CASE(), and PANEL_GIT_REMOTES::onRemoveRemote().
|
inlineinherited |
Definition at line 569 of file kicad_git_common.h.
References m_credentialsMutex, and m_nextPublicKey.
Referenced by BOOST_AUTO_TEST_CASE().
|
inherited |
Restore the project as it was at aCommitHash, recorded as a new commit on top of the current head.
Only the session's project folder is restored. A failure leaves its reason in aError's details, and a summary only when the next step is known.
Definition at line 1592 of file kicad_git_common.cpp.
References GetGitBackend(), and GIT_BACKEND::RestoreVersion().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Why binding a repository last failed, for the panels to show. Empty on success.
Definition at line 558 of file kicad_git_common.h.
References m_attachError, and m_attachTrustCommand.
|
inherited |
For a remote whose address names no transport, the user picks one in the prompt.
Definition at line 2130 of file kicad_git_common.cpp.
References m_connType, and m_credentialsMutex.
|
inlineinherited |
Definition at line 329 of file kicad_git_common.h.
References m_credentialsMutex, m_password, and m_secretFetched.
Referenced by DIALOG_GIT_REPOSITORY::OnTestClick(), and LIBGIT_BACKEND::SetupRemote().
|
inlineinherited |
Keep symlinks in the repository path so Git status paths match the project tree.
Definition at line 546 of file kicad_git_common.h.
References m_projectDir.
Referenced by PROJECT_TREE_PANE::onGitInitializeProject().
|
inlineinherited |
Definition at line 578 of file kicad_git_common.h.
References m_credentialsMutex, m_password, m_remote, m_secretFetched, SyncRemoteUrl(), and updateConnectionTypeUnlocked().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PROJECT_TREE_PANE::onGitRemoteSettings(), DIALOG_GIT_REPOSITORY::OnTestClick(), GIT_CLONE_HANDLER::SetRemote(), and LIBGIT_BACKEND::SetupRemote().
|
inherited |
Definition at line 1574 of file kicad_git_common.cpp.
References GetGitBackend(), m_repo, and GIT_BACKEND::SetRemoteUrl().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PANEL_GIT_REMOTES::onEditRemote().
|
inlineinherited |
Definition at line 241 of file kicad_git_common.h.
References git_repository, and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), LIBGIT_BACKEND::Clone(), LIBGIT_BACKEND::InitializeRepository(), and KICAD_MANAGER_CONTROL::NewFromRepository().
|
inlineinherited |
Stop the operation running now and keep later ones from starting.
Definition at line 661 of file kicad_git_common.h.
References m_activeCancel, m_operationMutex, and m_shutdown.
Referenced by BOOST_AUTO_TEST_CASE(), and PROJECT_TREE_PANE::onGitInitializeProject().
|
inherited |
Definition at line 1880 of file kicad_git_common.cpp.
References m_credentialsMutex, m_projectSSHKey, and rebuildPublicKeysUnlocked().
Referenced by BOOST_AUTO_TEST_CASE(), DIALOG_GIT_REPOSITORY::OnTestClick(), and LIBGIT_BACKEND::SetupRemote().
|
inherited |
Definition at line 1586 of file kicad_git_common.cpp.
References GetGitBackend(), m_repo, and GIT_BACKEND::SetUserConfig().
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Definition at line 322 of file kicad_git_common.h.
References m_credentialsMutex, m_secretFetched, and m_username.
Referenced by BOOST_AUTO_TEST_CASE(), PROJECT_TREE_PANE::onGitRemoteSettings(), DIALOG_GIT_REPOSITORY::OnTestClick(), and LIBGIT_BACKEND::SetupRemote().
|
inherited |
The SSH port the session's remote names for aHost, 22 when it names none, or -1 when the remote is on another host or its port is not valid.
Definition at line 1956 of file kicad_git_common.cpp.
References m_credentialsMutex, m_hostname, and m_port.
Referenced by certificate_check_cb().
|
inherited |
Point HEAD at a branch that does not exist yet, so the first commit creates it.
Only meaningful while the repository has no commits. With no commit to start it at, a branch cannot be created any other way.
Definition at line 1436 of file kicad_git_common.cpp.
References KIGIT::BranchNameError(), IsHeadUnborn(), and m_repo.
Referenced by BOOST_AUTO_TEST_CASE(), and moveToNewBranch().
|
inherited |
Definition at line 1469 of file kicad_git_common.cpp.
References GetGitBackend(), m_repo, and GIT_BACKEND::StashApply().
Referenced by BOOST_AUTO_TEST_CASE(), and PANEL_GIT_STASHES::restoreSelectedStash().
|
inherited |
Definition at line 1481 of file kicad_git_common.cpp.
References GetGitBackend(), m_repo, and GIT_BACKEND::StashDrop().
Referenced by BOOST_AUTO_TEST_CASE(), and PANEL_GIT_STASHES::onStashDrop().
|
inherited |
Definition at line 1475 of file kicad_git_common.cpp.
References GetGitBackend(), m_repo, and GIT_BACKEND::StashPop().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PANEL_GIT_STASHES::restoreSelectedStash().
|
inherited |
Set the uncommitted tracked changes aside as a new stash, as git stash push would.
Definition at line 1463 of file kicad_git_common.cpp.
References GetGitBackend(), m_repo, and GIT_BACKEND::StashSave().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Bind the session to the URL a transfer is about to connect to.
An unchanged URL keeps the session credentials, so a password corrected in the prompt outlives a stale one in the URL. A changed URL replaces the username and password with its own, clearing any it lacks.
Definition at line 2070 of file kicad_git_common.cpp.
References KIGIT_COMMON::REMOTE_URL::connType, KIGIT_COMMON::REMOTE_URL::hostname, m_connType, m_credentialsMutex, m_hostname, m_password, m_port, m_publicKeysHost, m_remote, m_secretFetched, m_urlUsername, m_username, ParseRemoteURL(), KIGIT_COMMON::REMOTE_URL::password, KIGIT_COMMON::REMOTE_URL::port, updatePublicKeys(), KIGIT_COMMON::REMOTE_URL::url, and KIGIT_COMMON::REMOTE_URL::username.
Referenced by credentials_cb(), FollowRewrittenUrl(), LIBGIT_BACKEND::PerformFetch(), LIBGIT_BACKEND::Push(), resolveMissingRemote(), SetRemote(), and UpdateCurrentBranchInfo().
|
inlineinherited |
Definition at line 377 of file kicad_git_common.h.
References m_testedTypes.
|
inlineinherited |
Definition at line 674 of file kicad_git_common.h.
References m_gitActionMutex.
Referenced by KIGIT::TryLockAction().
|
inherited |
TryLockAction that keeps trying for aWait before giving up.
For the UI thread, where a blocking LockAction could wait out a whole network timeout.
Definition at line 1967 of file kicad_git_common.cpp.
References m_gitActionMutex.
Referenced by resolveMissingRemote(), and KIGIT::WaitForActionLock().
|
privateinherited |
Definition at line 2517 of file kicad_git_common.cpp.
References m_credentialsMutex, and updateConnectionTypeUnlocked().
|
privateinherited |
Body of updateConnectionType, for callers that already hold m_credentialsMutex.
Definition at line 2524 of file kicad_git_common.cpp.
References KIGIT_COMMON::REMOTE_URL::connType, KIGIT_COMMON::REMOTE_URL::hostname, m_connType, m_hostname, m_password, m_port, m_remote, m_secretFetched, m_urlUsername, m_username, ParseRemoteURL(), KIGIT_COMMON::REMOTE_URL::password, KIGIT_COMMON::REMOTE_URL::port, KIGIT_COMMON::REMOTE_URL::url, and KIGIT_COMMON::REMOTE_URL::username.
Referenced by SetRemote(), and updateConnectionType().
|
inherited |
Definition at line 2044 of file kicad_git_common.cpp.
References GetRemotename(), m_repo, and SyncRemoteUrl().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PROJECT_TREE_PANE::onGitRemoteSettings(), and PANEL_GIT_REMOTES::runRemoteAction().
|
privateinherited |
Definition at line 2032 of file kicad_git_common.cpp.
References KIGIT::DefaultSSHKeyCandidates(), KIGIT::HomeDir(), m_credentialsMutex, m_discoveredKeys, m_hostname, m_publicKeysHost, and rebuildPublicKeysUnlocked().
Referenced by SyncRemoteUrl().
|
staticconstexprinherited |
Long enough for a status read to finish, short enough that a window does not look hung.
Definition at line 680 of file kicad_git_common.h.
Referenced by PROJECT_TREE_PANE::onGitInitializeProject(), resolveMissingRemote(), and KIGIT::WaitForActionLock().
|
staticprivateinherited |
Definition at line 766 of file kicad_git_common.h.
Referenced by HandleSSHAgentAuthentication(), and HandleSSHKeyAuthentication().
|
privateinherited |
Definition at line 760 of file kicad_git_common.h.
Referenced by ActiveCancelToken(), and SetShuttingDown().
|
protectedinherited |
Definition at line 699 of file kicad_git_common.h.
Referenced by GetAttachError(), and SetAttachError().
|
protectedinherited |
Definition at line 700 of file kicad_git_common.h.
Referenced by GetAttachTrustCommand(), and SetAttachError().
|
protectedinherited |
Definition at line 702 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), GetConnType(), GetCredentialIdentity(), GetPassword(), KIGIT_COMMON(), KIGIT_COMMON(), SetConnType(), SyncRemoteUrl(), and updateConnectionTypeUnlocked().
|
mutableprotectedinherited |
Serializes the credential fields between the UI thread and the authentication callback's worker thread.
wxString is copy on write, so a read racing a write corrupts it. Separate from m_gitActionMutex, which the worker holds while the callback runs.
Definition at line 717 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), FollowRewrittenUrl(), GetConnType(), GetCredentialIdentity(), GetFirstOfferedSSHKey(), GetNextPublicKey(), GetPassword(), GetRemote(), GetSSHKey(), GetUsername(), ResetNextKey(), SetConnType(), SetPassword(), SetRemote(), SetSSHKey(), SetUsername(), SSHPortFor(), SyncRemoteUrl(), updateConnectionType(), and updatePublicKeys().
|
privateinherited |
Definition at line 750 of file kicad_git_common.h.
Referenced by KIGIT_COMMON(), rebuildPublicKeysUnlocked(), and updatePublicKeys().
|
privateinherited |
One per entry in m_errorStrings.
Definition at line 94 of file kicad_git_errors.h.
Referenced by AddError(), GetErrorString(), and PopError().
|
privateinherited |
Definition at line 93 of file kicad_git_errors.h.
Referenced by AddError(), GetErrorString(), GetErrorStrings(), and PopError().
|
protectedinherited |
Definition at line 712 of file kicad_git_common.h.
Referenced by KIGIT_COMMON(), LockAction(), TryLockAction(), and TryLockActionFor().
|
protectedinherited |
Definition at line 705 of file kicad_git_common.h.
Referenced by KIGIT_COMMON(), SSHPortFor(), SyncRemoteUrl(), updateConnectionTypeUnlocked(), and updatePublicKeys().
|
privateinherited |
Definition at line 754 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), GetNextPublicKey(), KIGIT_COMMON(), KIGIT_COMMON(), rebuildPublicKeysUnlocked(), and ResetNextKey().
|
mutableprivateinherited |
Guarded together, so a shutdown cannot miss an operation registering itself at the same moment.
The token is null when nothing is running.
Definition at line 759 of file kicad_git_common.h.
Referenced by ActiveCancelToken(), IsShuttingDown(), and SetShuttingDown().
|
protectedinherited |
Definition at line 708 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), FollowRewrittenUrl(), GetPassword(), KIGIT_COMMON(), SetPassword(), SetRemote(), SyncRemoteUrl(), and updateConnectionTypeUnlocked().
|
protectedinherited |
Definition at line 706 of file kicad_git_common.h.
Referenced by KIGIT_COMMON(), SSHPortFor(), SyncRemoteUrl(), and updateConnectionTypeUnlocked().
|
protectedinherited |
Definition at line 697 of file kicad_git_common.h.
Referenced by GetProjectDir(), KIGIT_COMMON(), and SetProjectDir().
|
protectedinherited |
Definition at line 698 of file kicad_git_common.h.
Referenced by GetProjectPrefix(), KIGIT_COMMON(), and KIGIT_COMMON().
|
privateinherited |
Definition at line 753 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), GetFirstOfferedSSHKey(), GetSSHKey(), KIGIT_COMMON(), rebuildPublicKeysUnlocked(), and SetSSHKey().
|
privateinherited |
Definition at line 751 of file kicad_git_common.h.
Referenced by GetFirstOfferedSSHKey(), GetNextPublicKey(), GetSSHKey(), KIGIT_COMMON(), and rebuildPublicKeysUnlocked().
|
privateinherited |
Definition at line 752 of file kicad_git_common.h.
Referenced by KIGIT_COMMON(), SyncRemoteUrl(), and updatePublicKeys().
|
protectedinherited |
Definition at line 719 of file kicad_git_common.h.
Referenced by AddRefreshListener(), NotifyRefreshListeners(), and RemoveRefreshListener().
|
protectedinherited |
Definition at line 703 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), GetCredentialIdentity(), GetPassword(), GetRemote(), KIGIT_COMMON(), SetRemote(), SyncRemoteUrl(), and updateConnectionTypeUnlocked().
|
protectedinherited |
Definition at line 695 of file kicad_git_common.h.
Referenced by AbandonOperation(), AddRemote(), CheckoutTag(), compareRefs(), CreateBranch(), CreateMergedCommit(), CreateTag(), DeleteBranch(), DeleteTag(), DiscardChanges(), GetBranchDetail(), GetBranches(), GetCommitDetail(), GetCurrentBranchName(), GetDifferentFiles(), GetGitRootDirectory(), GetHeadCommitId(), GetLastCommitMessage(), GetLastFetchTime(), GetMergeConflicts(), GetProjectDir(), GetProjectDirs(), GetProjectPrefix(), GetRecentCommitMessages(), GetRecentCommits(), GetRemotename(), GetRemotes(), GetRepo(), GetStashDetail(), GetStashes(), GetTagDetail(), GetTags(), GetUnmergedCommitCount(), GetWorkingTreeLineStats(), HasLocalCommits(), HasPushAndPullRemote(), HasUncommittedTrackedChanges(), HasUpstreamCommits(), IsHeadDetached(), IsHeadUnborn(), IsOperationInProgress(), IsPathConflicted(), IsPathInHead(), IsPullRebaseConfigured(), KIGIT_COMMON(), KIGIT_COMMON(), OperationInProgress(), remoteNameWithoutUpstream(), RemoveRemote(), SetRemoteUrl(), SetRepo(), SetUserConfig(), StartUnbornBranch(), StashApply(), StashDrop(), StashPop(), StashSave(), and UpdateCurrentBranchInfo().
|
privateinherited |
Definition at line 755 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), FollowRewrittenUrl(), GetPassword(), KIGIT_COMMON(), KIGIT_COMMON(), SetPassword(), SetRemote(), SetUsername(), SyncRemoteUrl(), and updateConnectionTypeUnlocked().
|
privateinherited |
Definition at line 761 of file kicad_git_common.h.
Referenced by IsShuttingDown(), and SetShuttingDown().
|
protectedinherited |
Definition at line 710 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), HandlePlaintextAuthentication(), HandleSSHAgentAuthentication(), HandleSSHKeyAuthentication(), KIGIT_COMMON(), KIGIT_COMMON(), and TestedTypes().
|
protectedinherited |
Definition at line 704 of file kicad_git_common.h.
Referenced by KIGIT_COMMON(), SyncRemoteUrl(), and updateConnectionTypeUnlocked().
|
protectedinherited |
Definition at line 707 of file kicad_git_common.h.
Referenced by ApplyPromptedCredentials(), FollowRewrittenUrl(), GetCredentialIdentity(), GetPassword(), GetUsername(), KIGIT_COMMON(), SetUsername(), SyncRemoteUrl(), and updateConnectionTypeUnlocked().