Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Including git external diff in repo.

  • Loading branch information...
commit f3b0a3a5035caebd59b24ae8d7d34efaba597e15 1 parent 29c0659
Mario Pareja authored
Showing with 25 additions and 6 deletions.
  1. +4 −6 configure_git_defaults.sh
  2. +21 −0 winbin/gitextdiff.sh
10 configure_git_defaults.sh
View
@@ -13,12 +13,10 @@ if [ -e /c ]; then
git config --global diff.tool diffmerge
git config --global difftool.prompt false
- DROPBOX=/c/profiles/mpareja/Desktop/Dropbox/command_line_tools/gitextdiff.sh
- if [ ! -e "$DROPBOX" ]; then DROPBOX=/d/profiles/mpareja/Desktop/reference/command_line_tools/gitextdiff.sh; fi
-
- DBDrive=${DROPBOX:1:1}
- DBPath=${DROPBOX:2}
- DIFF=$(echo $DBDrive:$DBPath \"\$LOCAL\" \"\$REMOTE\")
+ Tool=$DOTFILES/winbin/gitextdiff.sh
+ ToolDrive=${Tool:1:1}
+ ToolPath=${Tool:2}
+ DIFF=$(echo $ToolDrive:$ToolPath \"\$LOCAL\" \"\$REMOTE\")
git config --global difftool.diffmerge.cmd "$DIFF"
fi
21 winbin/gitextdiff.sh
View
@@ -0,0 +1,21 @@
+#!/bin/sh
+if [ "$1" = '--install' ]; then
+ echo "Installing external diff tool"
+ git config --global difftool.diffmerge.cmd "$0 \"\$LOCAL\" \"\$REMOTE\""
+ git config --global diff.tool diffmerge
+ exit 0
+fi
+
+DIFF=/d/programs/development/diffmerge/DiffMerge.exe
+if [ ! -e "$DIFF" ]; then DIFF="$PROGRAMFILES/SourceGear/DiffMerge/DiffMerge.exe"; fi
+if [ ! -e "$DIFF" ]; then DIFF="$PROGRAMFILES/SourceGear/Common/DiffMerge/sgdm.exe"; fi
+if [ ! -e "$DIFF" ]; then DIFF=/e/programs/development/diffmerge/DiffMerge.exe; fi
+if [ ! -e "$DIFF" ]; then DIFF="$PROGRAMFILES (x86)/SourceGear/DiffMerge/DiffMerge.exe"; fi
+
+if [ ! -e "$DIFF" ]; then
+ echo "DiffMerge not found!"
+ exit 1
+fi
+
+"$DIFF" //title1="Old Version" "$1" //title2="New Version" "$2"
+
Please sign in to comment.
Something went wrong with that request. Please try again.