File: git-diff-tree

package info (click to toggle)
yash 2.60-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,152 kB
  • sloc: ansic: 34,578; makefile: 851; sh: 808; sed: 16
file content (65 lines) | stat: -rw-r--r-- 2,310 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# (C) 2012-2025 magicant

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

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

function completion/git::diff-tree:arg {

        OPTIONS=()
        command -f completion/git::diff-tree:getopt

        command -f completion//parseoptions
        case $ARGOPT in
                (-)
                        command -f completion//completeoptions
                        ;;
                ('')
                        command -f completion//getoperands
                        if [ ${WORDS[#]} -le 1 ]; then
                                command -f completion/git::completerefpath
                        else
                                complete -P "$PREFIX" -f
                        fi
                        ;;
                (*)
                        command -f completion/git::diff-tree:compopt
                        ;;
        esac

}

function completion/git::diff-tree:getopt {
        OPTIONS=("$OPTIONS" #>#
        "--always; show commit even if the diff is empty"
        "c; use the alternate format when printing a merge"
        "--combined-all-paths; list all filenames in combined diff"
        "m; don't suppress showing diffs of merge commits"
        "--merge-base; compare with the merge base of two commits"
        "--no-commit-id; don't print the commit ID"
        "r; compare directory trees recursively"
        "--root; compare against the null tree"
        "s; suppress normal diff output"
        "--stdin; read arguments from the standard input"
        "t; show tree entry itself as well as subtrees"
        "v; show commit messages as well"
        ) #<#
        command -f completion/git::getprettyopts
        { command -vf completion/git::diff:getopt >/dev/null 2>&1 ||
                        . -AL completion/git-diff; } &&
                command -f completion/git::diff:getopt
}

function completion/git::diff-tree:compopt {
        command -f completion/git::completeprettyopts ||
        { command -vf completion/git::diff:compopt >/dev/null 2>&1 ||
                        . -AL completion/git-diff; } &&
                command -f completion/git::diff:compopt
}


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