def METHOD_NAME(
    repo,
    args,
    kwargs=None,
):
    """
    Interprets positional args for kart diff, show, and log, including "--", commits/refs/ranges, and filters.
    Returns a three-tuple: (options, commits/refs/ranges, filters)
    """
    # As soon as we encounter a filter, we assume all remaining args are also filters.
    # i.e. the filters must be given *last*.
    # If it's ambiguous whether something is a filter or not, we assume it's a commit-ish.
    # If you want to be unambiguous, provide the `--` arg to separate the list of commit-ish-es and filters.
    # This behaviour should be consistent with git's behaviour.
    if "--" in args:
        dash_index = args.index("--")
        filters = list(args[dash_index + 1 :])
        revisions = args[:dash_index]
        _assert_no_options(revisions)
        options = _kwargs_as_options(kwargs)
        return options, revisions, filters
    else:
        _assert_no_options(args)
        options = _kwargs_as_options(kwargs)
        revisions, filters = _disambiguate_revisions_and_filters(repo, args)
        return options, revisions, filters