git config: support bcdiff/bcmerge from linux as well
This commit is contained in:
parent
e86ec078fb
commit
4bce7a84b6
@ -182,7 +182,6 @@ function git-config-joshs()
|
||||
git config --global alias.mktarxz '!function f { name="$1"; pos="$2"; if [ "$pos" == "" ]; then pos=HEAD; fi; git archive --prefix="$name"/ "$pos" | xz > ../"$name".tar.xz; }; f'
|
||||
git config --global alias.amd 'am --committer-date-is-author-date'
|
||||
git config --global push.default upstream
|
||||
if [ -e /bin/cygwin1.dll ]; then
|
||||
git config --global alias.bcdiff 'difftool -y -t bc3'
|
||||
git config --global alias.bcdiffc 'difftool -y -t bc3 --cached'
|
||||
git config --global difftool.bc3.cmd 'git_bc3diff "$LOCAL" "$REMOTE"'
|
||||
@ -190,7 +189,6 @@ function git-config-joshs()
|
||||
git config --global mergetool.bc3.cmd \
|
||||
'git_bc3merge "$LOCAL" "$REMOTE" "$MERGED"'
|
||||
git config --global mergetool.bc3.trustExitCode false
|
||||
fi
|
||||
}
|
||||
function git-config-local-personal()
|
||||
{
|
||||
|
13
git_bc3diff
13
git_bc3diff
@ -1,5 +1,14 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname) =~ CYGWIN ]]; then
|
||||
path1=$(cygpath -w "$1")
|
||||
path2=$(cygpath -w "$2")
|
||||
'/cygdrive/c/Program Files (x86)/Beyond Compare 3/BComp.exe' "$path1" "$path2" /title1=Base /leftreadonly
|
||||
'/cygdrive/c/apps/Beyond Compare 3/BCompare.exe' "$path1" "$path2" /title1=Base /leftreadonly &
|
||||
else
|
||||
bcompare "$1" "$2" -title1=Base -leftreadonly &
|
||||
fi
|
||||
|
||||
# git will remove the temporary file as soon as the difftool command exits;
|
||||
# sleep to give Beyond Compare a chance to load the file and display the diff
|
||||
# before the file is removed.
|
||||
sleep 1
|
||||
|
@ -1,6 +1,10 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname) =~ CYGWIN ]]; then
|
||||
local=$(cygpath -w "$1")
|
||||
remote=$(cygpath -w "$2")
|
||||
merged=$(cygpath -w "$3")
|
||||
'/cygdrive/c/Program Files (x86)/Beyond Compare 3/BComp.exe' "$local" "$remote" /title1=Local /title2=Remote /savetarget="$merged"
|
||||
'/cygdrive/c/apps/Beyond Compare 3/BCompare.exe' "$local" "$remote" /title1=Local /title2=Remote /savetarget="$merged"
|
||||
else
|
||||
bcompare "$1" "$2" -title1=Local -title2=Remote -savetarget="$3"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user