[v2,5/6] t7063: use POSIX find(1) syntax
diff mbox series

Message ID 1993b28a12cca8f35b89811ee7fea59c280931f3.1584838133.git.congdanhqx@gmail.com
State New
Headers show
Series
  • [v2,1/6] t4061: use POSIX compliance regex(7)
Related show

Commit Message

Đoàn Trần Công Danh March 22, 2020, 12:55 a.m. UTC
Since commit 6b7728db81, (t7063: work around FreeBSD's lazy mtime
update feature, 2016-08-03), we started to use ls as a trick to update
directory's mtime.

However, `-ls` flag isn't required by POSIX's find(1), and
busybox(1) doesn't implement it.

Use an equivalence `-exec ls -dils {} +` instead.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 t/t7063-status-untracked-cache.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh
index 190ae149cf..c2731d445a 100755
--- a/t/t7063-status-untracked-cache.sh
+++ b/t/t7063-status-untracked-cache.sh
@@ -18,7 +18,7 @@  GIT_FORCE_UNTRACKED_CACHE=true
 export GIT_FORCE_UNTRACKED_CACHE
 
 sync_mtime () {
-	find . -type d -ls >/dev/null
+	find . -type d -exec ls -dils {} + >/dev/null
 }
 
 avoid_racy() {