[PATCH v2 6/8] t7063: drop non-POSIX argument "-ls" from find(1)
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- Mar 22, 2020, 00:55 UTC
- Message-ID
- <59e3f73784b2a3bd9ccec87412e6178411c3708e.1584838148.git.congdanhqx@gmail.com>
- In-Reply-To
- <cover.1584838148.git.congdanhqx@gmail.com>
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.
From the original conversation, it seems like find(1) with "-type d" could trigger enough "lstat(2)" to ask FreeBSD update mtime.
Use only filter "-type d" for now.
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(-)
diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh index 190ae149cf..6791c6b95a 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 >/dev/null } avoid_racy() {
-- 2.26.0.rc2.310.g2932bb562d