projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d15d29e
)
Use 'git svn find-rev' in git-svnrevert instead of shell script fu.
author
Michael Gottesman
<mgottesman@apple.com>
Fri, 26 Apr 2013 03:27:39 +0000
(
03:27
+0000)
committer
Michael Gottesman
<mgottesman@apple.com>
Fri, 26 Apr 2013 03:27:39 +0000
(
03:27
+0000)
Thanks Chandler!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180592
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/git-svn/git-svnrevert
patch
|
blob
|
history
diff --git
a/utils/git-svn/git-svnrevert
b/utils/git-svn/git-svnrevert
index de4ff1cd4663a85fc96134a0d0b113cd2168016c..06a9c440915f1e26261def374fd48e8b4c0daba7 100755
(executable)
--- 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