def check_node(node):
    """Check whether git repo for node is intact.
    """
    if not node.files_current:
        return True
    try:
        with open(os.devnull, 'w') as fnull:
            subprocess.check_call(
                ['git', 'log'],
                cwd=os.path.join(settings.UPLOADS_PATH, node._id),
                stdout=fnull,
                stderr=fnull,
            )
        return True
    except subprocess.CalledProcessError:
        return False
    except __HOLE__:
        return False
dataset/ETHPy150Open CenterForOpenScience/osf.io/scripts/osfstorage/migrate_files.py/check_node