Skip to content

Instantly share code, notes, and snippets.

@jsocol
Created June 18, 2010 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsocol/443924 to your computer and use it in GitHub Desktop.
Save jsocol/443924 to your computer and use it in GitHub Desktop.
d - makes svn diffs pretty like git
#!/bin/bash
# Use colordiff and less to get git-like diffs out of SVN, too.
if [ -d '.svn' ]; then
DIFF=`svn diff $1`
if [ -n "$DIFF" ]; then
echo "$DIFF" | colordiff | less -R
fi
fi
if [ -d '.git' ]; then
git diff $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment