def fail_on_shallow(wd):
    """experimental, may change at any time"""
    if wd.is_shallow():
        raise ValueError(
            '%r is shallow, please correct with "git fetch --unshallow"' %
            wd.path)
