mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
add git-svn plugin with a git equivalent of svnversion
This commit is contained in:
parent
1120f97305
commit
ea0c1c95be
1 changed files with 15 additions and 0 deletions
15
plugins/git-svn/git-svn.plugin.zsh
Normal file
15
plugins/git-svn/git-svn.plugin.zsh
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#
|
||||||
|
# git equivalent of svnversion
|
||||||
|
#
|
||||||
|
get_svnversion()
|
||||||
|
{
|
||||||
|
alias git_svnversion="git svn find-rev `git log -1 --pretty=format:%H 2>/dev/null` 2>/dev/null"
|
||||||
|
LANG=C SVN_VERSION=`/usr/bin/svnversion`
|
||||||
|
if [ "X$SVN_VERSION" == "Xexported" -o "X$SVN_VERSION" == "X" ]; then
|
||||||
|
git_svnversion
|
||||||
|
else
|
||||||
|
echo $SVN_VERSION
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
alias svnversion=get_svnversion
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue