diff options
Diffstat (limited to 'utils/git-svn')
-rwxr-xr-x | utils/git-svn/git-svnrevert | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/git-svn/git-svnrevert b/utils/git-svn/git-svnrevert index de4ff1c..06a9c44 100755 --- a/utils/git-svn/git-svnrevert +++ b/utils/git-svn/git-svnrevert @@ -14,10 +14,9 @@ fi COMMIT=$1 -SVN_REVISION=$(git log -1 $COMMIT | grep git-svn-id | tr -s "@" " " | cut -f 4 -d " ") - -if [ -z "$SVN_REVISION" ]; then - echo "Error! Given commit is not a git-svn revision!" +SVN_REVISION=$(git svn find-rev "$COMMIT") +if [ $? -ne 0 ]; then + echo "Error! Could not find an svn revision for commit $COMMIT!" exit 1 fi |