From: Pete Wyckoff <pw@padd.com>
To: git@vger.kernel.org
Cc: Vitor Antunes <vitor.hda@gmail.com>
Subject: [PATCH 1/2] git-p4: remove bash-ism in t9809
Date: Sun, 26 Feb 2012 10:37:26 -0500 [thread overview]
Message-ID: <1330270647-8817-2-git-send-email-pw@padd.com> (raw)
In-Reply-To: <1330270647-8817-1-git-send-email-pw@padd.com>
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>
---
t/t9809-git-p4-client-view.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh
index ae9145e..18d93e4 100755
--- a/t/t9809-git-p4-client-view.sh
+++ b/t/t9809-git-p4-client-view.sh
@@ -31,7 +31,7 @@ client_view() {
#
check_files_exist() {
ok=0 &&
- num=${#@} &&
+ num=$# &&
for arg ; do
test_path_is_file "$arg" &&
ok=$(($ok + 1))
--
1.7.9.2.288.g74b75
next prev parent reply other threads:[~2012-02-26 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-26 15:37 [PATCH 0/2] git-p4: remove test bash-isms Pete Wyckoff
2012-02-26 15:37 ` Pete Wyckoff [this message]
2012-02-26 15:37 ` [PATCH 2/2] git-p4: remove bash-ism in t9800 Pete Wyckoff
2012-02-26 17:48 ` Johannes Sixt
2012-02-26 18:16 ` Pete Wyckoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330270647-8817-2-git-send-email-pw@padd.com \
--to=pw@padd.com \
--cc=git@vger.kernel.org \
--cc=vitor.hda@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).