git config: support bcdiff/bcmerge from linux as well
This commit is contained in:
parent
e86ec078fb
commit
4bce7a84b6
16
bash_aliases
16
bash_aliases
@ -182,15 +182,13 @@ 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.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 alias.amd 'am --committer-date-is-author-date'
|
||||||
git config --global push.default upstream
|
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.bcdiff 'difftool -y -t bc3'
|
git config --global alias.bcdiffc 'difftool -y -t bc3 --cached'
|
||||||
git config --global alias.bcdiffc 'difftool -y -t bc3 --cached'
|
git config --global difftool.bc3.cmd 'git_bc3diff "$LOCAL" "$REMOTE"'
|
||||||
git config --global difftool.bc3.cmd 'git_bc3diff "$LOCAL" "$REMOTE"'
|
git config --global alias.bcmerge 'mergetool -y -t bc3'
|
||||||
git config --global alias.bcmerge 'mergetool -y -t bc3'
|
git config --global mergetool.bc3.cmd \
|
||||||
git config --global mergetool.bc3.cmd \
|
'git_bc3merge "$LOCAL" "$REMOTE" "$MERGED"'
|
||||||
'git_bc3merge "$LOCAL" "$REMOTE" "$MERGED"'
|
git config --global mergetool.bc3.trustExitCode false
|
||||||
git config --global mergetool.bc3.trustExitCode false
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
function git-config-local-personal()
|
function git-config-local-personal()
|
||||||
{
|
{
|
||||||
|
17
git_bc3diff
17
git_bc3diff
@ -1,5 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
path1=$(cygpath -w "$1")
|
if [[ $(uname) =~ CYGWIN ]]; then
|
||||||
path2=$(cygpath -w "$2")
|
path1=$(cygpath -w "$1")
|
||||||
'/cygdrive/c/Program Files (x86)/Beyond Compare 3/BComp.exe' "$path1" "$path2" /title1=Base /leftreadonly
|
path2=$(cygpath -w "$2")
|
||||||
|
'/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
|
||||||
|
14
git_bc3merge
14
git_bc3merge
@ -1,6 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
local=$(cygpath -w "$1")
|
if [[ $(uname) =~ CYGWIN ]]; then
|
||||||
remote=$(cygpath -w "$2")
|
local=$(cygpath -w "$1")
|
||||||
merged=$(cygpath -w "$3")
|
remote=$(cygpath -w "$2")
|
||||||
'/cygdrive/c/Program Files (x86)/Beyond Compare 3/BComp.exe' "$local" "$remote" /title1=Local /title2=Remote /savetarget="$merged"
|
merged=$(cygpath -w "$3")
|
||||||
|
'/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