def _delete(self, key):
        try:
            commit = self.repo[self._refname]
            tree = self.repo[commit.tree]
        except __HOLE__:
            return  # not-found key errors are ignored

        commit = self._create_top_commit()
        objects_to_add = []

        components = [key.encode('ascii')]
        if self.subdir:
            components = self._subdir_components + components

        res = _on_tree(self.repo, tree, components, None)
        objects_to_add.extend(res)
        tree = res[-1]

        commit.tree = tree.id
        commit.message = (
            'Deleted key {}'.format(self.subdir + '/' + key)).encode('utf8')

        objects_to_add.append(commit)

        for obj in objects_to_add:
            self.repo.object_store.add_object(obj)

        self.repo.refs[self._refname] = commit.id
dataset/ETHPy150Open mbr/simplekv/simplekv/git.py/GitCommitStore._delete