From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH] tests: remove xargs in favor of --stdin where possible
Date: Thu, 23 Apr 2009 16:31:21 +1000 [thread overview]
Message-ID: <1240468281-23815-1-git-send-email-pclouds@gmail.com> (raw)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Patch "Convert to use quiet option when available" reminds me I had a similar
patch to remove (mostly) xargs usage from tests.
t/t0000-basic.sh | 2 +-
t/t3100-ls-tree-restrict.sh | 2 +-
t/t3101-ls-tree-dirname.sh | 2 +-
t/t4112-apply-renames.sh | 2 +-
t/t5000-tar-tree.sh | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index f4ca4fc..5c07645 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -142,7 +142,7 @@ fi
test_expect_success \
'adding various types of objects with git update-index --add.' \
- 'find path* ! -type d -print | xargs git update-index --add'
+ 'find path* ! -type d -print | git update-index --add --stdin'
# Show them and see that matches what we expect.
test_expect_success \
diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
index ee60d03..6e4faf8 100755
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -39,7 +39,7 @@ test_expect_success \
echo Lo >path2/foo &&
echo Mi >path2/baz/b &&
find path? \( -type f -o -type l \) -print |
- xargs git update-index --add &&
+ git update-index --add --stdin &&
tree=`git write-tree` &&
echo $tree'
diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh
index 51cb4a3..e0bf312 100755
--- a/t/t3101-ls-tree-dirname.sh
+++ b/t/t3101-ls-tree-dirname.sh
@@ -35,7 +35,7 @@ test_expect_success \
echo 111 >path3/1.txt &&
echo 222 >path3/2.txt &&
find *.txt path* \( -type f -o -type l \) -print |
- xargs git update-index --add &&
+ git update-index --add --stdin &&
tree=`git write-tree` &&
echo $tree'
diff --git a/t/t4112-apply-renames.sh b/t/t4112-apply-renames.sh
index f9ad183..6e56fa6 100755
--- a/t/t4112-apply-renames.sh
+++ b/t/t4112-apply-renames.sh
@@ -135,7 +135,7 @@ copy to klibc/arch/README
+add a few lines at the end of it.
EOF
-find klibc -type f -print | xargs git update-index --add --
+find klibc -type f -print | git update-index --add --stdin
test_expect_success 'check rename/copy patch' 'git apply --check patch'
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index abb41b0..f036988 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -54,8 +54,8 @@ test_expect_success \
test_expect_success \
'add files to repository' \
- 'find a -type f | xargs git update-index --add &&
- find a -type l | xargs git update-index --add &&
+ 'find a -type f | git update-index --add --stdin &&
+ find a -type l | git update-index --add --stdin &&
treeid=`git write-tree` &&
echo $treeid >treeid &&
git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
--
1.6.2.2.693.g5a1be
next reply other threads:[~2009-04-23 6:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 6:31 Nguyễn Thái Ngọc Duy [this message]
2009-04-23 8:36 ` [PATCH] tests: remove xargs in favor of --stdin where possible Junio C Hamano
2009-04-23 9:22 ` Johannes Sixt
2009-04-23 10:07 ` Nguyen Thai Ngoc Duy
2009-04-23 10:25 ` Junio C Hamano
2009-04-23 23:22 ` Nguyen Thai Ngoc Duy
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=1240468281-23815-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).