summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-07-23 02:09:05 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-23 03:34:16 (GMT)
commitf6e1a4d6dc4d1b3d82d5e87fdd817b3994dda5e0 (patch)
tree1322ada9a1dfcd001370437948ad2d4c24b8508b
parenta38e727925bfad369fc98165f6ff161193397f28 (diff)
downloadgit-f6e1a4d6dc4d1b3d82d5e87fdd817b3994dda5e0.zip
git-f6e1a4d6dc4d1b3d82d5e87fdd817b3994dda5e0.tar.gz
git-f6e1a4d6dc4d1b3d82d5e87fdd817b3994dda5e0.tar.bz2
[PATCH] Audit rev-parse users.
This patch changes rev-parse users that pass a single argument that is supposed to be a rev parameter to use "--verify". Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-checkout-script2
-rwxr-xr-xgit-cherry8
-rwxr-xr-xgit-commit-script2
-rwxr-xr-xgit-rebase-script8
-rwxr-xr-xgit-resolve-script4
5 files changed, 12 insertions, 12 deletions
diff --git a/git-checkout-script b/git-checkout-script
index 7e70338..a377407 100755
--- a/git-checkout-script
+++ b/git-checkout-script
@@ -22,7 +22,7 @@ while [ "$#" != "0" ]; do
force=1
;;
*)
- rev=$(git-rev-parse --verify --revs-only "$arg^0") || exit
+ rev=$(git-rev-parse --verify "$arg^0") || exit
if [ -z "$rev" ]; then
echo "unknown flag $arg"
exit 1
diff --git a/git-cherry b/git-cherry
index e2a1a2d..f3bfbf3 100755
--- a/git-cherry
+++ b/git-cherry
@@ -28,11 +28,11 @@ The output is intended to be used as:
'
case "$#" in
-1) linus=`git-rev-parse "$1"` &&
- junio=`git-rev-parse HEAD` || exit
+1) linus=`git-rev-parse --verify "$1"` &&
+ junio=`git-rev-parse --verify HEAD` || exit
;;
-2) linus=`git-rev-parse "$1"` &&
- junio=`git-rev-parse "$2"` || exit
+2) linus=`git-rev-parse --verify "$1"` &&
+ junio=`git-rev-parse --verify "$2"` || exit
;;
*) echo >&2 "$usage"; exit 1 ;;
esac
diff --git a/git-commit-script b/git-commit-script
index 04d16ae..dae487f 100755
--- a/git-commit-script
+++ b/git-commit-script
@@ -16,7 +16,7 @@ do
-m) shift
case "$#" in
0) usage ;;
- *) use_commit=`git-rev-parse "$1"` ||
+ *) use_commit=`git-rev-parse --verify "$1"` ||
exit ;;
esac
;;
diff --git a/git-rebase-script b/git-rebase-script
index 10ab700..5b791c6 100755
--- a/git-rebase-script
+++ b/git-rebase-script
@@ -11,11 +11,11 @@ upstream tree.'
: ${GIT_DIR=.git}
case "$#" in
-1) linus=`git-rev-parse "$1"` &&
- junio=`git-rev-parse HEAD` || exit
+1) linus=`git-rev-parse --verify "$1"` &&
+ junio=`git-rev-parse --verify HEAD` || exit
;;
-2) linus=`git-rev-parse "$1"` &&
- junio=`git-rev-parse "$2"` || exit
+2) linus=`git-rev-parse --verify "$1"` &&
+ junio=`git-rev-parse --verify "$2"` || exit
;;
*) echo >&2 "$usage"; exit 1 ;;
esac
diff --git a/git-resolve-script b/git-resolve-script
index fffcb07..52dd83b 100755
--- a/git-resolve-script
+++ b/git-resolve-script
@@ -6,8 +6,8 @@
#
. git-sh-setup-script || die "Not a git archive"
-head=$(git-rev-parse --revs-only "$1")
-merge=$(git-rev-parse --revs-only "$2")
+head=$(git-rev-parse --verify "$1")
+merge=$(git-rev-parse --verify "$2")
merge_msg="$3"
dropheads() {