46 git_index* index =
nullptr;
51 wxLogError(
"Failed to get repository index" );
57 if( git_index_find( &at_pos, index, aFilePath.ToUTF8().data() ) != 0 )
59 wxLogError(
"Failed to find index entry for %s", aFilePath );
72 git_index* index =
nullptr;
77 wxLogError(
"Failed to get repository index" );
83 if( git_index_remove_bypath( index, file.ToUTF8().data() ) != 0 )
85 wxLogError(
"Failed to remove index entry for %s", file );
89 if( git_index_write( index ) != 0 )
91 wxLogError(
"Failed to write index" );
95 if( git_index_write_tree( &oid, index ) != 0 )
97 wxLogError(
"Failed to write index tree" );
std::vector< wxString > m_filesToRemove
bool RemoveFromIndex(const wxString &aFilePath)
void PerformRemoveFromIndex()
GIT_REMOVE_FROM_INDEX_HANDLER(git_repository *aRepository)
git_repository * m_repository
virtual ~GIT_REMOVE_FROM_INDEX_HANDLER()
std::unique_ptr< git_index, decltype([](git_index *aIndex) { git_index_free(aIndex) GitIndexPtr
A unique pointer for git_index objects with automatic cleanup.