46 git_index* index =
nullptr;
51 wxLogError(
"Failed to get repository index" );
55 if( git_index_find( &at_pos, index, aFilePath.ToUTF8().data() ) == GIT_OK )
57 git_index_free( index );
58 wxLogError(
"%s already in index", aFilePath );
62 git_index_free( index );
73 git_index* index =
nullptr;
79 wxLogError(
"Failed to get repository index" );
86 if( git_index_add_bypath( index, file.ToUTF8().data() ) != 0 )
88 wxLogError(
"Failed to add %s to index", file );
95 if( git_index_write( index ) != 0 )
97 wxLogError(
"Failed to write index" );
100 git_index_free( index );
104 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)