mirror of
https://github.com/git/git
synced 2024-08-28 03:59:25 +00:00
git-checkout-script: use "--verify --revs-only" to parse revs
Sven Verdoolaege points out that I added the --verify option to git-rev-parse exactly for things like this, but didn't update the users.
This commit is contained in:
parent
e18088451d
commit
e2efb676ef
|
@ -12,7 +12,7 @@ while [ "$#" != "0" ]; do
|
||||||
force=1
|
force=1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
rev=$(git-rev-parse "$arg")
|
rev=$(git-rev-parse --verify --revs-only "$arg")
|
||||||
if [ -z "$rev" ]; then
|
if [ -z "$rev" ]; then
|
||||||
echo "unknown flag $arg"
|
echo "unknown flag $arg"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue