summaryrefslogtreecommitdiff
path: root/git-reset-script
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-15 22:37:37 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-15 22:37:37 (GMT)
commit2ad77e67c7c95982ebc9b99ee6a2d007feada62e (patch)
tree2b83ba74f7de1bb01dbbd6bfa4b5dbf0bb0237e6 /git-reset-script
parenta2f15a812c16cc0fa56a74af0e52d30ff4e615db (diff)
downloadgit-2ad77e67c7c95982ebc9b99ee6a2d007feada62e.zip
git-2ad77e67c7c95982ebc9b99ee6a2d007feada62e.tar.gz
git-2ad77e67c7c95982ebc9b99ee6a2d007feada62e.tar.bz2
Audit rev-parse users.
Make sure that we say --verify when we want to get a single SHA1 name. Also when we say --verify, --revs-only is redundant. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-reset-script')
-rwxr-xr-xgit-reset-script4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-reset-script b/git-reset-script
index 49994df..7da8d86 100755
--- a/git-reset-script
+++ b/git-reset-script
@@ -1,7 +1,7 @@
#!/bin/sh
. git-sh-setup-script || die "Not a git archive"
-rev=$(git-rev-parse --revs-only --verify --default HEAD "$@") || exit
-rev=$(git-rev-parse --revs-only --verify $rev^0) || exit
+rev=$(git-rev-parse --verify --default HEAD "$@") || exit
+rev=$(git-rev-parse --verify $rev^0) || exit
git-read-tree --reset "$rev" && {
if orig=$(git-rev-parse --verify HEAD 2>/dev/null)
then