KiCad PCB EDA Suite
Loading...
Searching...
No Matches
COMMIT_STAGING Struct Reference

Public Member Functions

bool Begin (git_repository *aRepo, const std::vector< wxString > &aFiles, KIGIT_ERROR_MESSAGE &aError)
 Read the index, record what it holds and take it over. False leaves the reason in aError.
 
bool BuildTree (git_repository *aRepo, const std::vector< wxString > &aFiles, KIGIT::GitTreePtr &aTreeOut, KIGIT_ERROR_MESSAGE &aError)
 Stage the chosen files over whatever the index already holds and write the tree they make.
 

Public Attributes

git_index * index = nullptr
 
KIGIT::GitIndexPtr indexPtr
 
std::set< std::string > selectedPaths
 
std::map< std::string, SELECTED_STATE > selectedAtStart
 
std::map< std::string, SELECTED_STATE > indexAtStart
 
bool haveIndexAtStart = false
 
git_oid headAtStart = {}
 
bool hadHeadAtStart = false
 
SCRATCH_INDEX_GUARD scratchGuard
 
std::vector< STAGED_ENTRY > committedEntries
 

Detailed Description

Definition at line 491 of file libgit_backend.cpp.

Member Function Documentation

◆ Begin()

bool COMMIT_STAGING::Begin ( git_repository * aRepo,
const std::vector< wxString > & aFiles,
KIGIT_ERROR_MESSAGE & aError )
inline

◆ BuildTree()

bool COMMIT_STAGING::BuildTree ( git_repository * aRepo,
const std::vector< wxString > & aFiles,
KIGIT::GitTreePtr & aTreeOut,
KIGIT_ERROR_MESSAGE & aError )
inline

Stage the chosen files over whatever the index already holds and write the tree they make.

False leaves the reason in aError.

Definition at line 540 of file libgit_backend.cpp.

References _, applySelectedPaths(), branchMovedSince(), committedEntries, KIGIT_COMMON::GetLastGitError(), git_repository, hadHeadAtStart, haveIndexAtStart, headAtStart, index, indexAtStart, indexChangedSince(), path, selectedAtStart, selectedPaths, and selectedPathsRestaged().

Referenced by LIBGIT_BACKEND::Amend(), and LIBGIT_BACKEND::Commit().

Member Data Documentation

◆ committedEntries

std::vector<STAGED_ENTRY> COMMIT_STAGING::committedEntries

Definition at line 502 of file libgit_backend.cpp.

Referenced by LIBGIT_BACKEND::Amend(), BuildTree(), and LIBGIT_BACKEND::Commit().

◆ hadHeadAtStart

bool COMMIT_STAGING::hadHeadAtStart = false

Definition at line 500 of file libgit_backend.cpp.

Referenced by Begin(), and BuildTree().

◆ haveIndexAtStart

bool COMMIT_STAGING::haveIndexAtStart = false

◆ headAtStart

git_oid COMMIT_STAGING::headAtStart = {}

Definition at line 499 of file libgit_backend.cpp.

Referenced by Begin(), and BuildTree().

◆ index

git_index* COMMIT_STAGING::index = nullptr

◆ indexAtStart

std::map<std::string, SELECTED_STATE> COMMIT_STAGING::indexAtStart

◆ indexPtr

KIGIT::GitIndexPtr COMMIT_STAGING::indexPtr

Definition at line 494 of file libgit_backend.cpp.

Referenced by Begin().

◆ scratchGuard

SCRATCH_INDEX_GUARD COMMIT_STAGING::scratchGuard

Definition at line 501 of file libgit_backend.cpp.

Referenced by LIBGIT_BACKEND::Amend(), Begin(), and LIBGIT_BACKEND::Commit().

◆ selectedAtStart

std::map<std::string, SELECTED_STATE> COMMIT_STAGING::selectedAtStart

◆ selectedPaths

std::set<std::string> COMMIT_STAGING::selectedPaths

The documentation for this struct was generated from the following file: