gitopendiffs
This commit is contained in:
parent
eec2108ce7
commit
11171e55e5
15
.bashrc
15
.bashrc
@ -231,7 +231,20 @@ gitdelbranch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gitopendiffs() {
|
gitopendiffs() {
|
||||||
vim -p `git diff --name-only origin/master | sed 's/src\///g'`
|
myhelp() {
|
||||||
|
echo 'This tool is usefull to open in vim the diff with a branch and a branch in origin'
|
||||||
|
echo 'Before to launch place in the repository'
|
||||||
|
}
|
||||||
|
if [ "$1" == '-h' ]; then
|
||||||
|
myhelp
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [ $1 == '']; then
|
||||||
|
branch='master'
|
||||||
|
else
|
||||||
|
branch=$1
|
||||||
|
fi
|
||||||
|
vim -p `git diff --name-only 'origin/'$branch | sed 's/src\///g'`
|
||||||
}
|
}
|
||||||
|
|
||||||
export PATH=~/bin/:$PATH
|
export PATH=~/bin/:$PATH
|
||||||
|
Loading…
x
Reference in New Issue
Block a user