-
-
Save geoff-nixon/7153630 to your computer and use it in GitHub Desktop.
Use 'git diff' to produce subversion style patches.
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 | |
svnstyle(){ sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" -e 's/@@\(.*\)@@.*/@@\1@@/g' ;} | |
DIFFPARAMS='--no-prefix --ignore-space-at-eol --minimal' | |
git diff $DIFFPARAMS "$@" | svnstyle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment