def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def mkhead(repo: 'Repo', path: PathLike) -> 'Head':
    """:return: New branch/head instance"""
    return git.Head(repo, git.Head.to_full_path(path))