Fix "$gitDir" being allowed to be the empty string 👼

This commit is contained in:
Tianon Gravi 2015-04-22 11:40:57 -06:00
parent fbe0b0e47f
commit 8e5d85dc7e
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ done
# usage: gitCheckout "$gitRepo" "$gitRef" "$gitDir"
gitCheckout() {
[ "$1" -a "$2" -a "$3" ] || return 1
[ "$1" -a "$2" ] || return 1 # "$3" is allowed to be the empty string
(
set -x
cd "$1"