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

Re: [PATCH] t/helper: 'test-chmtime (--get|-g)' to print only the mtime

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 9, 2018, 03:29 UTC
Message-ID
<xmqqvad15a7r.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180406221947.28402-1-ungureanupaulsebastian@gmail.com>
Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com> writes:
> -	find .git/rr-cache/ -type f | xargs test-chmtime -172800 &&
> +	test-chmtime -172800 $(find .git/rr-cache/ -type f) &&

You've sneaked this kind of rewrite in, as if you are testing to see how careful the reviewers are ;-).

We often use "find piped to xargs" pattern to avoid unbounded number of paths from appearing on a command line, busting platform limits. In the case of these test scripts, it does not matter very much, but such a "we can save a process and a pipe this way" optimization is not within the scope of "chmtime +v often is piped to sed only to strip path---let's give it a way to just grab the timestamp" topic. Not a very welcome change.

Having said that, I do not want this to be rerolled if this unrelated "removal of find-piped-to-xargs pattern" is the only niggle in the patch, as I've already checked if these conversions are safe (they are---we are not dealing with hundreds of stuff in .git/objects/ or .git/rr-cache/). There were conflicts caused by this patch and nd/combined-test-helper (which makes the test-chmtime standalone binary as a subcommand of test-tool); I think I resolved them correctly, but please double check when I update the public repositories in several hours.

Thanks.
Previous: Junio C Hamano
Message 3 of 3 in “t/helper: 'test-chmtime (--get|-g)' to print only the mtime”
  1. t/helper: 'test-chmtime (--get|-g)' to print only the mtimePaul-Sebastian Ungureanu, Apr 6, 2018
  2. Junio C HamanoApr 9, 2018
  3. Junio C HamanoApr 9, 2018

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.