git-fetch: avoid using "case ... in (arm)"

NetBSD ash chokes on the optional open parenthesis for case arms.  Inside
$(command substitution), however, bash barfs without.  So adjust things
accordingly.

Originally pointed out by Dennis Stosberg.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-05-28 19:24:28 -07:00
parent d177e58425
commit 878ccb2694

View File

@ -211,12 +211,12 @@ esac
reflist=$(get_remote_refs_for_fetch "$@") reflist=$(get_remote_refs_for_fetch "$@")
if test "$tags" if test "$tags"
then then
taglist=$(IFS=" " && taglist=`IFS=" " &&
git-ls-remote $upload_pack --tags "$remote" | git-ls-remote $upload_pack --tags "$remote" |
while read sha1 name while read sha1 name
do do
case "$name" in case "$name" in
(*^*) continue ;; *^*) continue ;;
esac esac
if git-check-ref-format "$name" if git-check-ref-format "$name"
then then
@ -224,7 +224,7 @@ then
else else
echo >&2 "warning: tag ${name} ignored" echo >&2 "warning: tag ${name} ignored"
fi fi
done) done`
if test "$#" -gt 1 if test "$#" -gt 1
then then
# remote URL plus explicit refspecs; we need to merge them. # remote URL plus explicit refspecs; we need to merge them.