Created
August 12, 2011 01:06
-
-
Save danro/1141221 to your computer and use it in GitHub Desktop.
Configure git diff to use pretty MacVim splits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[diff] | |
external = ~/scripts/git-diff-wrapper.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# diff is called by git with 7 parameters: | |
# path old-file old-hex old-mode new-file new-hex new-mode | |
mvim -d "$2" "$5" | cat |
What version of git are you working on? For 1.8.1.2 (packaged with OS X) there's only 2 arguments passed, old-file and new-file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When git try execute the script prompt this:
~/scripts/git-diff-wrapper.sh: /Users/miguel/scripts/git-diff-wrapper.sh: Permission denied
external diff died, stopping at .vimrc.
update------
Ok, it's necessary give execute permissions to .sh file:
chmod +x ~/scripts/git-diff-wrapper.sh
then works. Thanksss