def METHOD_NAME(mock_repo):
    # given
    mock_repo.active_branch.tracking_branch.side_effect = TypeError
    # when
    sha = get_upstream_index_sha(mock_repo)
    # then
    assert sha is None
    mock_repo.git.diff.assert_not_called()