47 git_index* index =
nullptr;
52 wxLogError(
"Failed to get repository index" );
56 if( git_index_find( &at_pos, index, aFilePath.ToUTF8().data() ) == GIT_OK )
58 git_index_free( index );
59 wxLogError(
"%s already in index", aFilePath );
63 git_index_free( index );
74 git_index* index =
nullptr;
80 wxLogError(
"Failed to get repository index" );
87 if( git_index_add_bypath( index, file.ToUTF8().data() ) != 0 )
89 wxLogError(
"Failed to add %s to index", file );
96 if( git_index_write( index ) != 0 )
98 wxLogError(
"Failed to write index" );
102 git_index_free( index );
106 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)