File: git-revert

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 (51 lines) | stat: -rw-r--r-- 1,932 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
# (C) 2011-2025 magicant

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

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

function completion/git::revert:arg {

        OPTIONS=( #>#
        "--abort; end suspended revert and restore the original state"
        "--cleanup:; specify the way the message is cleaned up"
        "--continue; resume suspended revert"
        "e --edit; (re)edit the message"
        "m: --mainline:; specify the mainline parent by number"
        "n --no-commit; don't commit the reversion result automatically"
        "--no-edit; don't reedit the message"
        "--no-gpg-sign; don't sign commits using GPG"
        "--no-rerere-autoupdate; don't update the index with rerere resolution"
        "--quit; end suspended quit and keep the current state"
        "--reference; use the reference format in the message"
        "--rerere-autoupdate; update the index with rerere resolution"
        "S:: --gpg-sign::; sign commits with GPG"
        "s --signoff; add a \"signed-off-by\" line to the message"
        "--strategy:; specify the merge strategy"
        "X: --strategy-option:; specify a strategy-specific option"
        ) #<#

        command -f completion//parseoptions
        case $ARGOPT in
                (-)
                        command -f completion//completeoptions
                        ;;
                ('')
                        command -f completion/git::completeref range=true
                        ;;
                (*)
                        if command -vf completion/git::merge:compopt >/dev/null 2>&1 ||
                                        . -AL completion/git-merge; then
                                command -f completion/git::merge:compopt
                        fi
                        ;;
        esac

}


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