in filemanager/gitwrapper.go [130:147]
func (fm *FileManager) runGitDelete(paths []string) *Error {
if len(paths) == 0 {
return nil
}
// Force flag is to delete files that have been already modified and cached
// Recursive flag is used to remove directories
cmd, customErr := fm.buildGitCommand(append([]string{"rm", "--force", "-r"}, paths...)...)
if customErr != nil {
return customErr
}
if err := cmd.Run(); err != nil {
return &Error{code: http.StatusUnprocessableEntity, err: fmt.Errorf("error deleting the files")}
}
return nil
}