File: git-cherry-pick

package info (click to toggle)
yash 2.43-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,184 kB
  • ctags: 3,159
  • sloc: ansic: 31,766; makefile: 812; sh: 407; sed: 16
file content (52 lines) | stat: -rw-r--r-- 1,495 bytes parent folder | download | duplicates (5)
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
# (C) 2011-2013 magicant

# Completion script for the "git-cherry-pick" command.
# Supports Git 1.8.1.4.

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

function completion/git::cherry-pick:arg {

	OPTIONS=( #>#
	"--abort; end suspended cherry-picking and restore the original state"
	"--allow-empty; allow commits that make no change"
	"--allow-empty-message"
	"--continue; resume suspended cherry-picking"
	"e --edit; reedit the message"
	"--ff; fast-forward if possible"
	"--keep-redundant-commits; don't omit already-merged commits"
	"m: --mainline:; apply diffs from the nth parent"
	"n --no-commit; don't commit the result automatically"
	"--quit; end suspended cherry-picking and keep the current state"
	"r; don't include the original commit ID in the message"
	"s --signoff; add a \"signed-off-by\" line to the message"
	"--strategy:; specify the merge strategy"
	"X: --strategy-option:; specify a strategy-specific option"
	"x; include the original commit ID in the message"
	) #<#

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

}


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