# (C) 2012-2025 magicant

# Completion script for the "git" command.
# Supports Git 2.48.1.

function completion/git-name-rev {
        WORDS=(git name-rev "${WORDS[2,-1]}")
        command -f completion//reexecute
}

function completion/git::name-rev:arg {

        OPTIONS=( #>#
        "--all; print all commits reachable from any refs"
        "--always; show uniquely abbreviated commit object as fallback"
        "--exclude:; do not consider refs matching the given glob"
        "--name-only; don't print SHA-1 before each name"
        "--no-exclude; cancel all previous --exclude options"
        "--no-undefined; exit with non-zero status for an undefined reference"
        "--refs:; specify refs that should be used by a pattern"
        "--annotate-stdin --stdin; filter the standard input, appending a name to each SHA-1"
        "--tags; use tag names only"
        ) #<#

        command -f completion//parseoptions -n
        case $ARGOPT in
                (-)
                        command -f completion//completeoptions
                        ;;
                (*)
                        command -f completion/git::completeref
                        ;;
        esac

}


# vim: set ft=sh ts=8 sts=8 sw=8 et:
