KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GIT_REMOVE_FROM_INDEX_HANDLER Class Reference

#include <git_remove_from_index_handler.h>

Inheritance diagram for GIT_REMOVE_FROM_INDEX_HANDLER:
KIGIT_COMMON

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 }
 

Public Member Functions

 GIT_REMOVE_FROM_INDEX_HANDLER (git_repository *aRepository)
 
virtual ~GIT_REMOVE_FROM_INDEX_HANDLER ()
 
bool RemoveFromIndex (const wxString &aFilePath)
 
void PerformRemoveFromIndex ()
 
git_repository * GetRepo () const
 
void SetRepo (git_repository *aRepo)
 
wxString GetCurrentBranchName () const
 
std::vector< wxString > GetBranchNames () 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 () const
 
GIT_CONN_TYPE GetConnType () const
 
void SetUsername (const wxString &aUsername)
 
void SetPassword (const wxString &aPassword)
 
void SetSSHKey (const wxString &aSSHKey)
 
unsigned & TestedTypes ()
 
bool HasLocalCommits () const
 
bool HasPushAndPullRemote () const
 
void UpdateCurrentBranchInfo ()
 
wxString GetGitRootDirectory () const
 
wxString GetRemotename () const
 
void ResetNextKey ()
 
wxString GetNextPublicKey ()
 
void SetRemote (const wxString &aRemote)
 
int HandleSSHKeyAuthentication (git_cred **aOut, const wxString &aUsername)
 
int HandlePlaintextAuthentication (git_cred **aOut, const wxString &aUsername)
 
int HandleSSHAgentAuthentication (git_cred **aOut, const wxString &aUsername)
 
bool IsCancelled () const
 
void SetCancelled (bool aCancel)
 

Static Public Member Functions

static wxString GetLastGitError ()
 

Protected Attributes

git_repository * m_repo
 
GIT_CONN_TYPE m_connType
 
wxString m_remote
 
wxString m_hostname
 
wxString m_username
 
wxString m_password
 
unsigned m_testedTypes
 
std::mutex m_gitActionMutex
 

Private Member Functions

void updatePublicKeys ()
 
void updateConnectionType ()
 

Private Attributes

std::vector< wxString > m_filesToRemove
 
std::vector< wxString > m_publicKeys
 
int m_nextPublicKey
 
std::atomic< bool > m_cancel
 

Static Private Attributes

static const unsigned KIGIT_CREDENTIAL_SSH_AGENT = 1 << sizeof( m_testedTypes - 1 )
 

Friends

class LIBGIT_BACKEND
 

Detailed Description

Definition at line 34 of file git_remove_from_index_handler.h.

Member Enumeration Documentation

◆ GIT_CONN_TYPE

enum class KIGIT_COMMON::GIT_CONN_TYPE
stronginherited
Enumerator
GIT_CONN_HTTPS 
GIT_CONN_SSH 
GIT_CONN_LOCAL 
GIT_CONN_LAST 

Definition at line 87 of file kicad_git_common.h.

◆ GIT_STATUS

enum class KIGIT_COMMON::GIT_STATUS
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 73 of file kicad_git_common.h.

Constructor & Destructor Documentation

◆ GIT_REMOVE_FROM_INDEX_HANDLER()

GIT_REMOVE_FROM_INDEX_HANDLER::GIT_REMOVE_FROM_INDEX_HANDLER ( git_repository * aRepository)

◆ ~GIT_REMOVE_FROM_INDEX_HANDLER()

GIT_REMOVE_FROM_INDEX_HANDLER::~GIT_REMOVE_FROM_INDEX_HANDLER ( )
virtual

Definition at line 36 of file git_remove_from_index_handler.cpp.

Member Function Documentation

◆ GetBranchNames()

std::vector< wxString > KIGIT_COMMON::GetBranchNames ( ) const
inherited

Definition at line 103 of file kicad_git_common.cpp.

References m_repo, and traceGit.

◆ GetConnType()

KIGIT_COMMON::GIT_CONN_TYPE KIGIT_COMMON::GetConnType ( ) const
inherited

◆ GetCurrentBranchName()

wxString KIGIT_COMMON::GetCurrentBranchName ( ) const
inherited

Definition at line 71 of file kicad_git_common.cpp.

References m_repo, and traceGit.

◆ GetDifferentFiles()

std::pair< std::set< wxString >, std::set< wxString > > KIGIT_COMMON::GetDifferentFiles ( ) const
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 234 of file kicad_git_common.cpp.

References delta, GetLastGitError(), m_repo, and traceGit.

◆ GetGitRootDirectory()

wxString KIGIT_COMMON::GetGitRootDirectory ( ) const
inherited

Definition at line 558 of file kicad_git_common.cpp.

References m_repo, and path.

Referenced by PROJECT_TREE_PANE::onRight().

◆ GetLastGitError()

◆ GetNextPublicKey()

wxString KIGIT_COMMON::GetNextPublicKey ( )
inlineinherited

Definition at line 123 of file kicad_git_common.h.

References m_nextPublicKey, and m_publicKeys.

Referenced by HandleSSHKeyAuthentication().

◆ GetPassword()

wxString KIGIT_COMMON::GetPassword ( ) const
inlineinherited

Definition at line 96 of file kicad_git_common.h.

References m_password.

Referenced by HandlePlaintextAuthentication(), and HandleSSHKeyAuthentication().

◆ GetProjectDirs()

std::vector< wxString > KIGIT_COMMON::GetProjectDirs ( )
inherited

Return a vector of project files in the repository.

Sorted by the depth of the project file in the directory tree

Returns
std::vector<wxString> of project files

Definition at line 166 of file kicad_git_common.cpp.

References GetLastGitError(), m_repo, and traceGit.

◆ GetRemotename()

wxString KIGIT_COMMON::GetRemotename ( ) const
inherited

Definition at line 477 of file kicad_git_common.cpp.

References GetLastGitError(), m_repo, and traceGit.

Referenced by GetConnType(), and UpdateCurrentBranchInfo().

◆ GetRepo()

git_repository * KIGIT_COMMON::GetRepo ( ) const
inherited

◆ GetUsername()

wxString KIGIT_COMMON::GetUsername ( ) const
inlineinherited

Definition at line 95 of file kicad_git_common.h.

References m_username.

◆ HandlePlaintextAuthentication()

int KIGIT_COMMON::HandlePlaintextAuthentication ( git_cred ** aOut,
const wxString & aUsername )
inherited

Definition at line 786 of file kicad_git_common.cpp.

References GetPassword(), and m_testedTypes.

Referenced by credentials_cb().

◆ HandleSSHAgentAuthentication()

int KIGIT_COMMON::HandleSSHAgentAuthentication ( git_cred ** aOut,
const wxString & aUsername )
inherited

◆ HandleSSHKeyAuthentication()

int KIGIT_COMMON::HandleSSHKeyAuthentication ( git_cred ** aOut,
const wxString & aUsername )
inherited

◆ HasLocalCommits()

bool KIGIT_COMMON::HasLocalCommits ( ) const
inherited

Definition at line 388 of file kicad_git_common.cpp.

References GetLastGitError(), m_repo, and traceGit.

Referenced by PROJECT_TREE_PANE::onRight().

◆ HasPushAndPullRemote()

bool KIGIT_COMMON::HasPushAndPullRemote ( ) const
inherited

Definition at line 449 of file kicad_git_common.cpp.

References m_repo, and traceGit.

Referenced by PROJECT_TREE_PANE::onRight().

◆ IsCancelled()

bool KIGIT_COMMON::IsCancelled ( ) const
inlineinherited

Definition at line 153 of file kicad_git_common.h.

References m_cancel.

Referenced by progress_cb(), and transfer_progress_cb().

◆ PerformRemoveFromIndex()

void GIT_REMOVE_FROM_INDEX_HANDLER::PerformRemoveFromIndex ( )

◆ RemoveFromIndex()

bool GIT_REMOVE_FROM_INDEX_HANDLER::RemoveFromIndex ( const wxString & aFilePath)

◆ ResetNextKey()

void KIGIT_COMMON::ResetNextKey ( )
inlineinherited

Definition at line 121 of file kicad_git_common.h.

References m_nextPublicKey.

◆ SetCancelled()

void KIGIT_COMMON::SetCancelled ( bool aCancel)
inlineinherited

Definition at line 158 of file kicad_git_common.h.

References m_cancel.

Referenced by LIBGIT_BACKEND::PerformFetch(), and LIBGIT_BACKEND::Push().

◆ SetPassword()

void KIGIT_COMMON::SetPassword ( const wxString & aPassword)
inlineinherited

Definition at line 100 of file kicad_git_common.h.

References m_password.

Referenced by DIALOG_GIT_REPOSITORY::OnTestClick(), and LIBGIT_BACKEND::SetupRemote().

◆ SetRemote()

void KIGIT_COMMON::SetRemote ( const wxString & aRemote)
inlineinherited

Definition at line 131 of file kicad_git_common.h.

References m_remote, and updateConnectionType().

Referenced by DIALOG_GIT_REPOSITORY::OnTestClick().

◆ SetRepo()

void KIGIT_COMMON::SetRepo ( git_repository * aRepo)
inlineinherited

Definition at line 49 of file kicad_git_common.h.

References m_repo.

Referenced by LIBGIT_BACKEND::Clone(), and LIBGIT_BACKEND::InitializeRepository().

◆ SetSSHKey()

void KIGIT_COMMON::SetSSHKey ( const wxString & aSSHKey)
inherited

◆ SetUsername()

void KIGIT_COMMON::SetUsername ( const wxString & aUsername)
inlineinherited

Definition at line 99 of file kicad_git_common.h.

References m_username.

Referenced by DIALOG_GIT_REPOSITORY::OnTestClick(), and LIBGIT_BACKEND::SetupRemote().

◆ TestedTypes()

unsigned & KIGIT_COMMON::TestedTypes ( )
inlineinherited

Definition at line 106 of file kicad_git_common.h.

References m_testedTypes.

◆ updateConnectionType()

void KIGIT_COMMON::updateConnectionType ( )
privateinherited

◆ UpdateCurrentBranchInfo()

void KIGIT_COMMON::UpdateCurrentBranchInfo ( )
inherited

◆ updatePublicKeys()

void KIGIT_COMMON::updatePublicKeys ( )
privateinherited

Definition at line 569 of file kicad_git_common.cpp.

References m_hostname, m_publicKeys, and SetSSHKey().

Referenced by PROJECT_TREE_PANE, and UpdateCurrentBranchInfo().

Friends And Related Symbol Documentation

◆ LIBGIT_BACKEND

friend class LIBGIT_BACKEND
friend

Definition at line 46 of file git_remove_from_index_handler.h.

References LIBGIT_BACKEND.

Referenced by LIBGIT_BACKEND.

Member Data Documentation

◆ KIGIT_CREDENTIAL_SSH_AGENT

const unsigned KIGIT_COMMON::KIGIT_CREDENTIAL_SSH_AGENT = 1 << sizeof( m_testedTypes - 1 )
staticprivateinherited

Definition at line 194 of file kicad_git_common.h.

Referenced by HandleSSHAgentAuthentication(), and HandleSSHKeyAuthentication().

◆ m_cancel

std::atomic<bool> KIGIT_COMMON::m_cancel
privateinherited

Definition at line 190 of file kicad_git_common.h.

Referenced by IsCancelled(), and SetCancelled().

◆ m_connType

GIT_CONN_TYPE KIGIT_COMMON::m_connType
protectedinherited

Definition at line 166 of file kicad_git_common.h.

Referenced by KIGIT_COMMON(), KIGIT_COMMON(), and updateConnectionType().

◆ m_filesToRemove

std::vector<wxString> GIT_REMOVE_FROM_INDEX_HANDLER::m_filesToRemove
private

◆ m_gitActionMutex

std::mutex KIGIT_COMMON::m_gitActionMutex
protectedinherited

◆ m_hostname

wxString KIGIT_COMMON::m_hostname
protectedinherited

Definition at line 168 of file kicad_git_common.h.

Referenced by KIGIT_COMMON(), updateConnectionType(), and updatePublicKeys().

◆ m_nextPublicKey

int KIGIT_COMMON::m_nextPublicKey
privateinherited

Definition at line 188 of file kicad_git_common.h.

Referenced by GetNextPublicKey(), KIGIT_COMMON(), KIGIT_COMMON(), and ResetNextKey().

◆ m_password

wxString KIGIT_COMMON::m_password
protectedinherited

◆ m_publicKeys

std::vector<wxString> KIGIT_COMMON::m_publicKeys
privateinherited

Definition at line 187 of file kicad_git_common.h.

Referenced by GetNextPublicKey(), KIGIT_COMMON(), SetSSHKey(), and updatePublicKeys().

◆ m_remote

wxString KIGIT_COMMON::m_remote
protectedinherited

◆ m_repo

◆ m_testedTypes

unsigned KIGIT_COMMON::m_testedTypes
protectedinherited

◆ m_username

wxString KIGIT_COMMON::m_username
protectedinherited

The documentation for this class was generated from the following files: