def groups_option(f):
    new_func = click.option("-g", "--groups",
                            help="Comma-separated list of requirement groups "
                            "to include.")(f)
    return update_wrapper(new_func, f)
def has_commit(cls, location, rev):
        """
        Check if rev is a commit that is available in the local repository.
        """
        try:
            cls.run_command(
                ['rev-parse', '-q', '--verify', "sha^" + rev],
                cwd=location,
                log_failed_cmd=False,
            )
        except InstallationError:
            return False
        else:
            return True