All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fernando Ramos <greenfoo@u92.eu>
To: git@vger.kernel.org
Cc: gitster@pobox.com, davvid@gmail.com, seth@eseth.com,
	levraiphilippeblain@gmail.com, rogi@skylittlesystem.org
Subject: [PATCH 3/3] vimdiff: remove deprecated {,g,n}vimdiff{1,2,3} variants
Date: Thu,  4 Nov 2021 17:09:59 +0100	[thread overview]
Message-ID: <20211104160959.183402-4-greenfoo@u92.eu> (raw)
In-Reply-To: <20211104160959.183402-1-greenfoo@u92.eu>

After this commit is merged, users of "{,g,n}vimdiff{1,2,3}" will need to
set their merge tool to "{,g,v}vimdiff" (without the number suffix) and
the "mergetool.{,g,n}vimdiff.layout" configuration option to one of
these:

  * For "1" variant: "LOCAL* | REMOTE"
  * For "2" variant: "LOCAL | MERGED | REMOTE"
  * For "3" variant: "MERGED"

Signed-off-by: Fernando Ramos <greenfoo@u92.eu>
---
 mergetools/vimdiff | 125 ++-------------------------------------------
 1 file changed, 4 insertions(+), 121 deletions(-)

diff --git a/mergetools/vimdiff b/mergetools/vimdiff
index aa8fbc0a19..9d469c0553 100644
--- a/mergetools/vimdiff
+++ b/mergetools/vimdiff
@@ -436,33 +436,18 @@ diff_cmd_help() {
 			window and REMOTE changes in the right one.
 		ENDOFMESSAGE
 		;;
-	vimdiff*)
-		cat <<-ENDOFMESSAGE
-			Same as 'vimdiff'
-		ENDOFMESSAGE
-		;;
 	gvimdiff)
 		cat <<-ENDOFMESSAGE
 			Same as 'vimdiff' but opens 'gvim' instead (which uses a graphical toolkit for
 			opening its own window)
 		ENDOFMESSAGE
 		;;
-	gvimdiff*)
-		cat <<-ENDOFMESSAGE
-			Same as 'gvimdiff'
-		ENDOFMESSAGE
-		;;
 	nvimdiff)
 		cat <<-ENDOFMESSAGE
 			Same as 'vimdiff' but opens 'neovim' instead (which is a fork of the original
 			'vim' 'focused on extensibility and usability' according to their authors)
 		ENDOFMESSAGE
 		;;
-	nvimdiff*)
-		cat <<-ENDOFMESSAGE
-			Same as 'nvimdiff'
-		ENDOFMESSAGE
-		;;
 	esac
 
 	return 0
@@ -471,7 +456,6 @@ diff_cmd_help() {
 
 merge_cmd () {
 	layout=$(git config mergetool.$merge_tool.layout)
-	print_warning="false"
 
 	case "$1" in
 	*vimdiff)
@@ -481,34 +465,8 @@ merge_cmd () {
 			layout="(LOCAL | BASE | REMOTE) - MERGED"
 		fi
 		;;
-	*vimdiff1)
-		layout="LOCAL* | MERGED"
-		print_warning="true"
-		;;
-	*vimdiff2)
-		layout="LOCAL | MERGED | REMOTE"
-		print_warning="true"
-		;;
-	*vimdiff3)
-		layout="MERGED"
-		print_warning="true"
-		;;
 	esac
 
-	if test "$print_warning" = "true"
-	then
-		echo "WARNING:"
-		echo "WARNING: '$1' is going to be removed in a future version. You will be"
-		echo "WARNING: able to obtain the same result by selecting 'vimdiff' as the merge"
-		echo "WARNING: tool and setting configuration variable 'mergetool.vimdiff.layout'"
-		echo "WARNING: to the following value:"
-		echo "WARNING:"
-		echo "WARNING:     layout = \"$layout\""
-		echo "WARNING:"
-		echo "Press ENTER to continue..."
-		read
-	fi
-
 	gen_cmd "$layout"
 
 	debug_print ""
@@ -682,30 +640,6 @@ merge_cmd_help() {
 
 		ENDOFMESSAGE
 		;;
-	vimdiff1)
-		cat <<-ENDOFMESSAGE
-			Same as 'vimdiff' using this layout: "LOCAL* | REMOTE"
-			
-			This will probably be deprecated in the future. Please use "vimdiff" and
-			manually set the "mergetool.vimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
-	vimdiff2)
-		cat <<-ENDOFMESSAGE
-			Same as 'vimdiff' using this layout: "LOCAL | MERGED | REMOTE"
-			
-			This will probably be deprecated in the future. Please use "vimdiff" and
-			manually set the "mergetool.vimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
-	vimdiff3)
-		cat <<-ENDOFMESSAGE
-			Same as 'vimdiff' using this layout: "MERGED"
-			
-			This will probably be deprecated in the future. Please use "vimdiff" and
-			manually set the "mergetool.vimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
 	gvimdiff)
 		cat <<-ENDOFMESSAGE
 			Same as 'vimdiff' but opens 'gvim' instead (which uses a graphical toolkit for
@@ -714,30 +648,6 @@ merge_cmd_help() {
 			"mergetool.gvimdiff.layout"
 		ENDOFMESSAGE
 		;;
-	gvimdiff1)
-		cat <<-ENDOFMESSAGE
-			Same as 'gvimdiff' using this layout: "LOCAL* | REMOTE"
-			
-			This will probably be deprecated in the future. Please use "gvimdiff" and
-			manually set the "mergetool.gvimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
-	gvimdiff2)
-		cat <<-ENDOFMESSAGE
-			Same as 'gvimdiff' using this layout: "LOCAL | MERGED | REMOTE"
-			
-			This will probably be deprecated in the future. Please use "gvimdiff" and
-			manually set the "mergetool.gvimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
-	gvimdiff3)
-		cat <<-ENDOFMESSAGE
-			Same as 'gvimdiff' using this layout: "MERGED"
-			
-			This will probably be deprecated in the future. Please use "gvimdiff" and
-			manually set the "mergetool.gvimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
 	nvimdiff)
 		cat <<-ENDOFMESSAGE
 			Same as 'vimdiff' but opens 'neovim' instead (which is a fork of the original
@@ -746,30 +656,6 @@ merge_cmd_help() {
 			"mergetool.nvimdiff.layout"
 		ENDOFMESSAGE
 		;;
-	nvimdiff1)
-		cat <<-ENDOFMESSAGE
-			Same as 'nvimdiff' using this layout: "LOCAL* | REMOTE"
-			
-			This will probably be deprecated in the future. Please use "nvimdiff" and
-			manually set the "mergetool.nvimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
-	nvimdiff2)
-		cat <<-ENDOFMESSAGE
-			Same as 'nvimdiff' using this layout: "LOCAL | MERGED | REMOTE"
-			
-			This will probably be deprecated in the future. Please use "nvimdiff" and
-			manually set the "mergetool.nvimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
-	nvimdiff3)
-		cat <<-ENDOFMESSAGE
-			Same as 'nvimdiff' using this layout: "MERGED"
-			
-			This will probably be deprecated in the future. Please use "nvimdiff" and
-			manually set the "mergetool.nvimdiff.layout" configuration variable instead.
-		ENDOFMESSAGE
-		;;
 	esac
 
 	return 0
@@ -778,13 +664,13 @@ merge_cmd_help() {
 
 translate_merge_tool_path() {
 	case "$1" in
-	nvimdiff*)
+	nvimdiff)
 		echo nvim
 		;;
-	gvimdiff*)
+	gvimdiff)
 		echo gvim
 		;;
-	vimdiff*)
+	vimdiff)
 		echo vim
 		;;
 	esac
@@ -798,10 +684,7 @@ exit_code_trustable () {
 
 list_tool_variants () {
 	for prefix in '' g n; do
-		for suffix in '' 1 2 3
-		do
-			echo "${prefix}vimdiff${suffix}"
-		done
+		echo "${prefix}vimdiff"
 	done
 }
 
-- 
2.33.1


      parent reply	other threads:[~2021-11-04 16:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 16:09 [PATCH 0/3] vimdiff: new layout option + docs Fernando Ramos
2021-11-04 16:09 ` [PATCH 1/3] vimdiff: new implementation with layout support Fernando Ramos
2021-11-07 22:41   ` David Aguilar
2021-11-08  0:47     ` Eric Sunshine
2021-11-04 16:09 ` [PATCH 2/3] vimdiff: add tool documentation Fernando Ramos
2021-11-07 21:24   ` David Aguilar
2021-11-08  1:02     ` Eric Sunshine
2021-11-08 19:08     ` Junio C Hamano
2021-11-04 16:09 ` Fernando Ramos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211104160959.183402-4-greenfoo@u92.eu \
    --to=greenfoo@u92.eu \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=levraiphilippeblain@gmail.com \
    --cc=rogi@skylittlesystem.org \
    --cc=seth@eseth.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.