All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Aguilar <davvid@gmail.com>
Cc: Sebastian Schuberth <sschuberth@gmail.com>,
	Pat Thoyts <patthoyts@users.sourceforge.net>,
	Olivier Croquette <ocroquette@free.fr>,
	git@vger.kernel.org
Subject: Re: [PATCH] Copy mergetool "bc3" as "bc4"
Date: Tue, 21 Oct 2014 11:27:53 -0700	[thread overview]
Message-ID: <xmqqsiihz39y.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20141021084436.GA39148@gmail.com> (David Aguilar's message of "Tue, 21 Oct 2014 01:44:38 -0700")

David Aguilar <davvid@gmail.com> writes:

> Otherwise, this patch looks like the right way to go ~ it makes
> "bc" available and keeps compatibility for "bc3".

OK, thanks.  Here is what I'll queue.

-- >8 --
From: Junio C Hamano <gitster@pobox.com>
Date: Mon, 20 Oct 2014 15:49:36 -0700
Subject: [PATCH] mergetool: rename bc3 to bc

Beyond Compare version 4 works the same way as version 3, so rename
the existing "bc3" adaptor to just "bc", while keeping "bc3" as a
backward compatible wrapper.

Noticed-by: Olivier Croquette <ocroquette@free.fr>
Helped-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 contrib/completion/git-completion.bash |  2 +-
 git-mergetool--lib.sh                  |  2 +-
 mergetools/bc                          | 25 +++++++++++++++++++++++++
 mergetools/bc3                         | 26 +-------------------------
 4 files changed, 28 insertions(+), 27 deletions(-)
 create mode 100644 mergetools/bc

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 06bf262..8a19b3e 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1207,7 +1207,7 @@ _git_diff ()
 }
 
 __git_mergetools_common="diffuse diffmerge ecmerge emerge kdiff3 meld opendiff
-			tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare
+			tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc codecompare
 "
 
 _git_difftool ()
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index c45a020..a40d3df 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -250,7 +250,7 @@ list_merge_tool_candidates () {
 			tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
 		fi
 		tools="$tools gvimdiff diffuse diffmerge ecmerge"
-		tools="$tools p4merge araxis bc3 codecompare"
+		tools="$tools p4merge araxis bc codecompare"
 	fi
 	case "${VISUAL:-$EDITOR}" in
 	*vim*)
diff --git a/mergetools/bc b/mergetools/bc
new file mode 100644
index 0000000..b6319d2
--- /dev/null
+++ b/mergetools/bc
@@ -0,0 +1,25 @@
+diff_cmd () {
+	"$merge_tool_path" "$LOCAL" "$REMOTE"
+}
+
+merge_cmd () {
+	touch "$BACKUP"
+	if $base_present
+	then
+		"$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
+			-mergeoutput="$MERGED"
+	else
+		"$merge_tool_path" "$LOCAL" "$REMOTE" \
+			-mergeoutput="$MERGED"
+	fi
+	check_unchanged
+}
+
+translate_merge_tool_path() {
+	if type bcomp >/dev/null 2>/dev/null
+	then
+		echo bcomp
+	else
+		echo bcompare
+	fi
+}
diff --git a/mergetools/bc3 b/mergetools/bc3
index b6319d2..5d8dd48 100644
--- a/mergetools/bc3
+++ b/mergetools/bc3
@@ -1,25 +1 @@
-diff_cmd () {
-	"$merge_tool_path" "$LOCAL" "$REMOTE"
-}
-
-merge_cmd () {
-	touch "$BACKUP"
-	if $base_present
-	then
-		"$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
-			-mergeoutput="$MERGED"
-	else
-		"$merge_tool_path" "$LOCAL" "$REMOTE" \
-			-mergeoutput="$MERGED"
-	fi
-	check_unchanged
-}
-
-translate_merge_tool_path() {
-	if type bcomp >/dev/null 2>/dev/null
-	then
-		echo bcomp
-	else
-		echo bcompare
-	fi
-}
+. "$MERGE_TOOLS_DIR/bc"
-- 
2.1.2-583-g325e495

  reply	other threads:[~2014-10-21 18:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 11:03 [PATCH] Copy mergetool "bc3" as "bc4" Olivier Croquette
2014-10-20 16:40 ` Junio C Hamano
2014-10-20 17:32   ` Junio C Hamano
2014-10-20 18:23     ` Sebastian Schuberth
2014-10-20 18:40       ` Junio C Hamano
2014-10-21  8:44         ` David Aguilar
2014-10-21 18:27           ` Junio C Hamano [this message]
2014-10-20 20:35     ` Olivier Croquette

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=xmqqsiihz39y.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ocroquette@free.fr \
    --cc=patthoyts@users.sourceforge.net \
    --cc=sschuberth@gmail.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.