Code

git-p4: remove bash-ism in t9809
authorPete Wyckoff <pw@padd.com>
Sun, 26 Feb 2012 15:37:26 +0000 (10:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2012 00:19:22 +0000 (16:19 -0800)
Plain old $# works to count the number of arguments in
either bash or dash, even if the arguments have spaces.

Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9809-git-p4-client-view.sh

index 96426414aadca543d650cd607b385c75f377260d..b0c6d4391daa041cf379f402704fb0989849e727 100755 (executable)
@@ -31,7 +31,7 @@ client_view() {
 #
 check_files_exist() {
        ok=0 &&
-       num=${#@} &&
+       num=$# &&
        for arg ; do
                test_path_is_file "$arg" &&
                ok=$(($ok + 1))