Created
April 24, 2012 15:29
-
-
Save xero/2480631 to your computer and use it in GitHub Desktop.
using winmerge with git diff - replaces unix style null files with a newly created empty windows temp file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# using winmerge with git | |
# replaces unix style null files with a newly created empty windows temp file | |
file1=$1 | |
if [ "$file1" == '/dev/null' ] || [ "$file1" == '\\.\nul' ] || [ ! -e "$file1" ] | |
then | |
file1="/tmp/gitnull" | |
`echo "">$file1` | |
fi | |
file2=$2 | |
if [ "$file2" == '/dev/null' ] || [ "$file2" == '\\.\nul' ] || [ ! -e "$file2" ] | |
then | |
file2="/tmp/gitnull" | |
`echo "">$file2` | |
fi | |
echo diff : $1 -- $2 | |
"C:\Program files (x86)\WinMerge\WinMergeU.exe" -e -ub -dl "Base" -dr "Mine" "$file1" "$file2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Goes in C:\Program Files\Git\bin