Skip to content

Instantly share code, notes, and snippets.

@tmoreira2020
Created June 13, 2010 02:51
Show Gist options
  • Save tmoreira2020/436284 to your computer and use it in GitHub Desktop.
Save tmoreira2020/436284 to your computer and use it in GitHub Desktop.
function parse_git_svn_revision {
ref1=$(__git_ps1 | sed -e "s/ (\(.*\))/(git: \1$(parse_git_dirty))/")
#ref1=$(parse_git_branch)
if [ "x$ref1" != "x" ]; then
ref2=$(git branch -a | grep git-svn)
if [ "x$ref2" != "x" ]; then
ref3=$(git svn info | grep Revision)
echo " ${ref1} (svn: r"${ref3#Revision: }") "
else
echo " ${ref1} "
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment