diff --git a/bash_aliases b/bash_aliases index 1481ead..4e07d82 100755 --- a/bash_aliases +++ b/bash_aliases @@ -90,11 +90,23 @@ function git-config-joshs() git config --global core.excludesfile ${HOME}/.gitignore git config --global core.pager 'less -FRXi' git config --global alias.dc 'diff --cached' + git config --global alias.gdiff 'difftool -y -t gvimdiff' + git config --global alias.gdiffc 'difftool -y -t gvimdiff --cached' + if [ -e /bin/cygwin1.dll ]; then + git config --global alias.bcdiff 'difftool -y -t bc2' + git config --global alias.bcdiffc 'difftool -y -t bc2 --cached' + git config --global difftool.bc2.cmd 'git_bc2diff "$LOCAL" "$REMOTE"' + git config --global alias.bcmerge 'mergetool -y -t bc2' + git config --global mergetool.bc2.cmd \ + 'git_bc2merge "$LOCAL" "$REMOTE" "$MERGED"' + git config --global mergetool.bc2.trustExitCode false + fi } alias git-find-lost-commit='git fsck --lost-found' if [[ "$(which jsvn 2>/dev/null)" != "" ]]; then alias svn='jsvn' fi +alias jindent='indent -bbo -bl -blf -bli0 -bls -i4 -npcs -nut -ts8' # source any machine-local aliases # this way ~/.bash_aliases can be a symlink to a version-controlled diff --git a/git_bc2diff b/git_bc2diff new file mode 100755 index 0000000..9b5ac04 --- /dev/null +++ b/git_bc2diff @@ -0,0 +1,5 @@ +#!/bin/sh + +path1=$(cygpath -w "$1") +path2=$(cygpath -w "$2") +/cygdrive/c/apps/Beyond\ Compare\ 2/BC2.exe "$path1" "$path2" /title1=Base /leftreadonly diff --git a/git_bc2merge b/git_bc2merge new file mode 100755 index 0000000..6d17f2b --- /dev/null +++ b/git_bc2merge @@ -0,0 +1,6 @@ +#!/bin/sh + +local=$(cygpath -w "$1") +remote=$(cygpath -w "$2") +merged=$(cygpath -w "$3") +/cygdrive/c/apps/Beyond\ Compare\ 2/BC2.exe "$local" "$remote" /title1=Local /title2=Remote /savetarget="$merged" diff --git a/jsvn b/jsvn index 0f6e8ce..eced502 100755 --- a/jsvn +++ b/jsvn @@ -283,7 +283,7 @@ def binaries(argv, svn, base_path = '.'): ent_path = os.sep.join([base_path, ent]) if os.path.isfile(ent_path): mime_type = getSVNProperty(svn, 'svn:mime-type', ent_path) - if re.match(r'application/octet-stream', mime_type): + if mime_type != '' and not re.match(r'text/.*', mime_type): # we found a binary file needs_lock = getSVNProperty(svn, 'svn:needs-lock', ent_path) if needs_lock: