Skip to content

Instantly share code, notes, and snippets.

@richdownie
Created March 31, 2010 15:14
Show Gist options
  • Save richdownie/350448 to your computer and use it in GitHub Desktop.
Save richdownie/350448 to your computer and use it in GitHub Desktop.
#Git setup
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(git::\1)/'
}
parse_svn_branch() {
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print "(svn::"$1 "/" $2 ")"}'
}
parse_svn_url() {
svn info 2>/dev/null | grep -e '^URL*' | sed -e 's#^URL: *\(.*\)#\1#g '
}
".bash_profile" 34L, 1309C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment