from typing import OrderedDict


def commits_diff_between_branches(base, divergent, repo):
    """
    Get the commits in branch `divergent` that are not in `base`.
    
    :param base: 
    :param divergent: 
    :param repo: 
    :return: an `OrderedDict whose keys are the sha1 of the commits
            and values the commit titles
    """
    commits = OrderedDict()
    out = repo.git.log('--oneline', '{}..{}'.format(base, divergent))
    for line in out.split('\n'):
        sha, _, title = line.partition(' ')
        commits[sha] = title

    return commits