Created
January 19, 2016 22:46
-
-
Save goodell/d837a554775bb19f760f to your computer and use it in GitHub Desktop.
This file contains 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/zsh | |
# see this output: | |
# $ svn diff --diff-cmd showargs sa/src/palo/include/sereno/sereno_defs.h | |
# Index: sa/src/palo/include/sereno/sereno_defs.h | |
# =================================================================== | |
# $#=7 | |
# $1=|-u| | |
# $2=|-L| | |
# $3=|sa/src/palo/include/sereno/sereno_defs.h (revision 258787)| | |
# $4=|-L| | |
# $5=|sa/src/palo/include/sereno/sereno_defs.h (working copy)| | |
# $6=|/home/dgoodell/svn/bodega-dev/.svn/pristine/50/50a9914f087cd2f4758d878df14e15901d04a096.svn-base| | |
# $7=|/tmp/svn-vQYxuP| | |
PRETTY_LEFT="$3" | |
PRETTY_RIGHT="$5" | |
LEFT="$6" | |
RIGHT="$7" | |
if (( $FORCE_COLOR )) || [[ -t 1 ]] ; then | |
COLOR_ARG='--color=always' | |
else | |
COLOR_ARG='--color=never' | |
fi | |
git --no-pager diff $COLOR_ARG --no-index --patience "$LEFT" "$RIGHT" | \ | |
perl -p -e "s{\Q--- a$LEFT\E}{--- a/$PRETTY_LEFT}; s{\Q+++ b$RIGHT\E}{+++ b/$PRETTY_RIGHT};" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rename this script to
svn-patiencediff
, make it executable, then in your~/.subversion/config
, set this: