d69bad8eb4157e5fd5c1a4ce98f93cf522477a8c

Author
Felipe Contreras <felipe.contreras@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

gitfast: downgrade to upstream v2.16 (#7918)

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git
  2index c003a67717be122376ac416b2601ed073a68392f..78a6dbb3d19adb2940d5ea67dc3ffb9c26ba0dbd 100644
  3--- a/plugins/gitfast/_git
  4+++ b/plugins/gitfast/_git
  5@@ -39,7 +39,7 @@ if [ -z "$script" ]; then
  6 		test -f $e && script="$e" && break
  7 	done
  8 fi
  9-GIT_SOURCING_ZSH_COMPLETION=y . "$script"
 10+ZSH_VERSION='' . "$script"
 11 
 12 __gitcomp ()
 13 {
 14@@ -93,22 +93,13 @@ __gitcomp_nl_append ()
 15 	compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
 16 }
 17 
 18-__gitcomp_file_direct ()
 19-{
 20-	emulate -L zsh
 21-
 22-	local IFS=$'\n'
 23-	compset -P '*[=:]'
 24-	compadd -f -- ${=1} && _ret=0
 25-}
 26-
 27 __gitcomp_file ()
 28 {
 29 	emulate -L zsh
 30 
 31 	local IFS=$'\n'
 32 	compset -P '*[=:]'
 33-	compadd -p "${2-}" -f -- ${=1} && _ret=0
 34+	compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
 35 }
 36 
 37 __git_zsh_bash_func ()
 38diff --git a/plugins/gitfast/git-completion.bash b/plugins/gitfast/git-completion.bash
 39index 700417879e7b8e9532b72fb106cdcab9d0d14c4a..b6ff5dc0840e3667434b9d7f614007ae9bbfc77a 100644
 40--- a/plugins/gitfast/git-completion.bash
 41+++ b/plugins/gitfast/git-completion.bash
 42@@ -29,8 +29,6 @@
 43 # tell the completion to use commit completion.  This also works with aliases
 44 # of form "!sh -c '...'".  For example, "!sh -c ': git commit ; ... '".
 45 #
 46-# Compatible with bash 3.2.57.
 47-#
 48 # You can set the following environment variables to influence the behavior of
 49 # the completion routines:
 50 #
 51@@ -94,70 +92,6 @@ __git ()
 52 		${__git_dir:+--git-dir="$__git_dir"} "$@" 2>/dev/null
 53 }
 54 
 55-# Removes backslash escaping, single quotes and double quotes from a word,
 56-# stores the result in the variable $dequoted_word.
 57-# 1: The word to dequote.
 58-__git_dequote ()
 59-{
 60-	local rest="$1" len ch
 61-
 62-	dequoted_word=""
 63-
 64-	while test -n "$rest"; do
 65-		len=${#dequoted_word}
 66-		dequoted_word="$dequoted_word${rest%%[\\\'\"]*}"
 67-		rest="${rest:$((${#dequoted_word}-$len))}"
 68-
 69-		case "${rest:0:1}" in
 70-		\\)
 71-			ch="${rest:1:1}"
 72-			case "$ch" in
 73-			$'\n')
 74-				;;
 75-			*)
 76-				dequoted_word="$dequoted_word$ch"
 77-				;;
 78-			esac
 79-			rest="${rest:2}"
 80-			;;
 81-		\')
 82-			rest="${rest:1}"
 83-			len=${#dequoted_word}
 84-			dequoted_word="$dequoted_word${rest%%\'*}"
 85-			rest="${rest:$((${#dequoted_word}-$len+1))}"
 86-			;;
 87-		\")
 88-			rest="${rest:1}"
 89-			while test -n "$rest" ; do
 90-				len=${#dequoted_word}
 91-				dequoted_word="$dequoted_word${rest%%[\\\"]*}"
 92-				rest="${rest:$((${#dequoted_word}-$len))}"
 93-				case "${rest:0:1}" in
 94-				\\)
 95-					ch="${rest:1:1}"
 96-					case "$ch" in
 97-					\"|\\|\$|\`)
 98-						dequoted_word="$dequoted_word$ch"
 99-						;;
100-					$'\n')
101-						;;
102-					*)
103-						dequoted_word="$dequoted_word\\$ch"
104-						;;
105-					esac
106-					rest="${rest:2}"
107-					;;
108-				\")
109-					rest="${rest:1}"
110-					break
111-					;;
112-				esac
113-			done
114-			;;
115-		esac
116-	done
117-}
118-
119 # The following function is based on code from:
120 #
121 #   bash_completion - programmable completion functions for bash 3.2+
122@@ -330,32 +264,9 @@ __gitcomp ()
123 	case "$cur_" in
124 	--*=)
125 		;;
126-	--no-*)
127-		local c i=0 IFS=$' \t\n'
128-		for c in $1; do
129-			if [[ $c == "--" ]]; then
130-				continue
131-			fi
132-			c="$c${4-}"
133-			if [[ $c == "$cur_"* ]]; then
134-				case $c in
135-				--*=*|*.) ;;
136-				*) c="$c " ;;
137-				esac
138-				COMPREPLY[i++]="${2-}$c"
139-			fi
140-		done
141-		;;
142diff --git a/plugins/gitfast/update b/plugins/gitfast/update
143index 76ecc71e01046456dc98ece8ce22e26757bb4876..05054245f1759b41a2ce31f822e6cb20c6f17d65 100755
144--- a/plugins/gitfast/update
145+++ b/plugins/gitfast/update
146@@ -1,7 +1,7 @@
147 #!/bin/sh
148 
149 url="https://git.kernel.org/pub/scm/git/git.git/plain/contrib/completion"
150-version="2.21.0"
151+version="2.16.0"
152 
153 curl -s -o _git "${url}/git-completion.zsh?h=v${version}" &&
154 curl -s -o git-completion.bash "${url}/git-completion.bash?h=v${version}" &&