Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # .bashrc / git
- function haverev {
- if [ "x$1" = "x" ]; then
- echo "diff against have revision: which file?"
- return 0
- fi
- left=`git log --raw --abbrev=40 -n 1 --pretty=oneline $1 | tail -n 1 | cut -d ' ' -f 4`
- git show $left > /tmp/a
- echo "blob $left @ /tmp/a"
- diffmerge /tmp/a $1
- return 1
- }
- function lastrev {
- if [ "x$1" = "x" ]; then
- echo "diff against last revision: which file?"
- return 0
- fi
- left=`git log --raw --abbrev=40 -n 1 --pretty=oneline $1 | tail -n 1 | cut -d ' ' -f 3`
- right=`git log --raw --abbrev=40 -n 1 --pretty=oneline $1 | tail -n 1 | cut -d ' ' -f 4`
- git show $left > /tmp/a
- git show $right > /tmp/b
- echo "blob $left @ /tmp/a"
- echo "blob $right @ /tmp/b"
- diffmerge /tmp/a /tmp/b &
- return 1
- }
- function nrev {
- left=$1
- right=$2
- git show $left > /tmp/a
- git show $right > /tmp/b
- echo "blob $left @ /tmp/a"
- echo "blob $right @ /tmp/b"
- diffmerge /tmp/a /tmp/b &
- return 1
- }
Add Comment
Please, Sign In to add comment