def get_version(repo_path):
    try:
        version = __version__.split('.')
        major, minor, cn = [int(i) for i in version]
        p = subprocess.Popen(['git',
                              '--git-dir', os.path.join(repo_path, '.git'),
                              '--work-tree', repo_path,
                              'rev-list', 'HEAD', '--count'],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        raw, err = p.communicate()
        c_head = int(raw.decode('ascii'))
        q = subprocess.Popen(['git',
                              '--git-dir', os.path.join(repo_path, '.git'),
                              '--work-tree', repo_path,
                              'rev-list', 'master', '--count'],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        raw, err = q.communicate()
        c_master = int(raw.decode('ascii'))
        cc = c_master - c_head
        assert cc
        return '%s.%s.%s' % (major, minor, cn + cc)
    except:
        return __version__
dataset/ETHPy150Open soimort/you-get/src/you_get/util/git.py/get_version/swapped operands of `-`