-
-
Save blackjack/2a8186cc19183cd662e1 to your computer and use it in GitHub Desktop.
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/bash | |
REALSVN=/usr/bin/svn | |
ARGS="$@" | |
if [ "$1" = "commit" -o "$1" = "ci" ]; then | |
shift # pop off $1 for diff | |
skip_args=("--help" "-h" "--message" "-m" "--file" "-F") | |
skip=false | |
for var in ARGS | |
do | |
for item in skip_args | |
do | |
if [ "$var" = "$item" ] | |
then | |
skip=true | |
fi | |
done | |
done | |
if [ skip = true ] | |
then | |
TEMPLATE=$(mktemp) | |
$REALSVN diff "$@" > "$TEMPLATE" | |
$REALSVN $ARGS --editor-cmd="/usr/local/bin/svn-diff-editor '$TEMPLATE'" | |
else | |
$REALSVN commit "$@" | |
fi | |
else | |
$REALSVN $ARGS | |
fi | |
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/bash | |
echo >> "$2" | |
cat "$1" >> "$2" | |
rm "$1" | |
vim "+set ft=diff" "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment