[PATCH] mergetools: enable tortoisemerge as difftool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



TortoiseMerge/TortoiseGitMerge can also be used to view and edit file differences.

This change allows configuring tortoisemerge not only as mergetool but as difftool as well.
---
 mergetools/tortoisemerge | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/mergetools/tortoisemerge b/mergetools/tortoisemerge
index d7ab666a59a2c..d3dcec1407f2d 100644
--- a/mergetools/tortoisemerge
+++ b/mergetools/tortoisemerge
@@ -1,5 +1,13 @@
-can_diff () {
-	return 1
+diff_cmd () {
+	basename="$(basename "$merge_tool_path" .exe)"
+	if test "$basename" = "tortoisegitmerge"
+	then
+		"$merge_tool_path" \
+			-mine "$REMOTE" -base "$LOCAL"
+	else
+		"$merge_tool_path" \
+			-mine:"$REMOTE" -base:"$LOCAL"
+	fi
 }
 
 merge_cmd () {

--
https://github.com/git/git/pull/471



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux