git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/6] t7063: use POSIX find(1) syntax

From
Jeff King <peff@peff.net>
Date
Mar 20, 2020, 05:37 UTC
Message-ID
<20200320053730.GE499858@coredump.intra.peff.net>
In-Reply-To
<20200320014142.GF1858@danh.dev>
On Fri, Mar 20, 2020 at 08:41:42AM +0700, Danh Doan wrote:
Show 23 quoted lines
> On 2020-03-19 15:16:09-0700, Junio C Hamano <gitster@pobox.com> wrote:
> > Jeff King <peff@peff.net> writes:
> > 
> > > On Thu, Mar 19, 2020 at 09:00:06PM +0700, Đoàn Trần Công Danh wrote:
> > >
> > >> 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.
> > >
> > > Makes sense. I wonder if we need all of "-dils", but it's not clear to
> 
> From the original commit message, I think whichever flags that call
> stat(2) would be do it. It's `-d` (to check is_directory), and `-i`
> for inode number.
> 
> This make make wonder, will it be enough to just use:
> 
> 	find . -type d >/dev/null

Perhaps we can get a friendly FreeBSD developer (cc'd) to run a quick test for us.

Ed, the question is whether:
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() {

lets t7063 consistently pass on FreeBSD.

-Peff
Previous: Danh DoanNext: Danh Doan
Message 23 of 35 in “fix test failure with busybox”
  1. 0/6 fix test failure with busyboxĐoàn Trần Công Danh, Mar 19, 2020
  2. 1/6 t4061: use POSIX compliance regex(7)Đoàn Trần Công Danh, Mar 19, 2020
  3. Jeff KingMar 19, 2020
  4. Eric SunshineMar 19, 2020
  5. Junio C HamanoMar 19, 2020
  6. Danh DoanMar 20, 2020
  7. 2/6 test-lib-functions: test_cmp: eval $GIT_TEST_CMPĐoàn Trần Công Danh, Mar 19, 2020
  8. Jeff KingMar 19, 2020
  9. Eric SunshineMar 19, 2020
  10. Danh DoanMar 20, 2020
  11. 3/6 t5003: skip conversion test if unzip -a is unavailableĐoàn Trần Công Danh, Mar 19, 2020
  12. Jeff KingMar 19, 2020
  13. Danh DoanMar 20, 2020
  14. Jeff KingMar 20, 2020
  15. 4/6 t5616: use rev-parse instead to get HEAD's object_idĐoàn Trần Công Danh, Mar 19, 2020
  16. Jeff KingMar 19, 2020
  17. Danh DoanMar 20, 2020
  18. 5/6 t7063: use POSIX find(1) syntaxĐoàn Trần Công Danh, Mar 19, 2020
  19. Jeff KingMar 19, 2020
  20. Junio C HamanoMar 19, 2020
  21. Danh DoanMar 20, 2020
  22. Danh DoanMar 20, 2020
  23. Jeff KingMar 20, 2020
  24. Danh DoanMar 22, 2020
  25. Jeff KingMar 22, 2020
  26. 6/6 t4124: fix test for non-compliance diffĐoàn Trần Công Danh, Mar 19, 2020
  27. Jeff KingMar 19, 2020
  28. Junio C HamanoMar 19, 2020
  29. Jeff KingMar 20, 2020
  30. Danh DoanMar 20, 2020
  31. Jeff KingMar 20, 2020
  32. Jeff KingMar 19, 2020
  33. Danh DoanMar 20, 2020
  34. Jeff KingMar 20, 2020
  35. Jeff KingMar 19, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.