45 git_index* index =
nullptr;
50 wxLogError(
"Failed to get repository index" );
54 if( git_index_find( &at_pos, index, aFilePath.ToUTF8().data() ) == GIT_OK )
56 git_index_free( index );
57 wxLogError(
"%s already in index", aFilePath );
61 git_index_free( index );
72 git_index* index =
nullptr;
78 wxLogError(
"Failed to get repository index" );
85 if( git_index_add_bypath( index, file.ToUTF8().data() ) != 0 )
87 wxLogError(
"Failed to add %s to index", file );
94 if( git_index_write( index ) != 0 )
96 wxLogError(
"Failed to write index" );
99 git_index_free( index );
103 git_index_free( index );
GIT_ADD_TO_INDEX_HANDLER(git_repository *aRepository)
git_repository * m_repository
std::vector< wxString > m_filesToAdd
virtual ~GIT_ADD_TO_INDEX_HANDLER()
std::vector< wxString > m_filesFailedToAdd
bool AddToIndex(const wxString &aFilePath)