File: git-rebase

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 (111 lines) | stat: -rw-r--r-- 4,926 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# (C) 2011-2025 magicant

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

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

function completion/git::rebase:arg {

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

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

}

function completion/git::rebase:getopt {
        OPTIONS=("$OPTIONS" #>#
        "--abort; abort the current rebasing and reset to the original"
        "--allow-empty-message"
        "--apply; use git-am internally"
        "--autosquash; find commits to be squashed (with -i)"
        "--autostash; stash before and restore after rebasing"
        "--committer-date-is-author-date; use author date for committer date"
        "--continue; continue the current rebasing"
        "--edit-todo; re-edit the to-do list of the current rebasing"
        "--empty:; specify how to handle commits that become empty"
        "f --force-rebase --no-ff; create new commits without fast-forwarding"
        "--fork-point; use reflog to find a better common ancestor"
        "--ignore-date --reset-author-date; reset author date to current time"
        "i --interactive; interactively reedit commits that are rebased"
        "--keep-base; apply commits starting from the same merge base"
        "--keep-empty; don't omit commits that make no change"
        "m --merge; use merging strategies to rebase"
        "--no-autosquash; cancel the --autosquash option"
        "--no-autostash; cancel the --autostash option"
        "--no-fork-point; ignore reflog when finding a better common ancestor"
        "--no-gpg-sign; don't sign commits with GPG"
        "--no-keep-empty; omit commits that make no change"
        "--no-reapply-cherry-picks; drop cherry-picks from the upstream"
        "--no-reschedule-failed-exec"
        "--no-rerere-autoupdate; disable the rerere mechanism"
        "n --no-stat; don't print a diffstat"
        "--no-update-refs; don't update other branches"
        "--no-verify; don't run the pre-rebase hook"
        "--onto; specify a branch to rebase onto"
        # Deprecated "p --preserve-merges; don't ignore merge commits"
        "q --quiet; don't print anything"
        "--quit; end suspended rebasing and keep the current state"
        "--reapply-cherry-picks; keep cherry-picks from the upstream"
        "r --rebase-merges::; recreate merge commits"
        "--rerere-autoupdate; enable the rerere mechanism"
        "--reschedule-failed-exec"
        "--root; rebase all ancestor commits"
        "S:: --gpg-sign::; sign commits with GPG"
        "--signoff; add a \"signed-off-by\" line to the message"
        "--show-current-patch"
        "--skip; skip the current patch and continue rebasing"
        "--stat; print a diffstat from the last rebase"
        "s: --strategy:; specify the merge strategy"
        "x: --exec:; insert an \"exec\" line with the specified command after each commit (with -i)"
        "X: --strategy-option:; specify a strategy-specific option"
        "--update-refs; update other branches to point at the rebased commits"
        "v --verbose; output additional information"
        "--verify; run the pre-rebase hook"
        ) #<#
        if command -vf completion/git::apply:getopt >/dev/null 2>&1 ||
                        . -AL completion/git-apply; then
                command -f completion/git::apply:getopt rebase
        fi
}

function completion/git::rebase:compopt
        case $ARGOPT in
                (--empty)
                        command -f completion/git::--empty:arg
                        ;;
                (--rebase-merges)
                        complete -P "$PREFIX" no-rebase-cousins rebase-cousins
                        ;;
                (S|--gpg-sign)
                        command -f completion/git::--gpg-sign:arg
                        ;;
                (*)
                        if command -vf completion/git::apply:compopt >/dev/null 2>&1 ||
                                        . -AL completion/git-apply; then
                                command -f completion/git::apply:compopt
                        fi
                        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: