t/helper: allow chmtime to print verbosely without modifying mtime
commit19a3a7bde9164c86353c944e939a1dcb537993f9
authorPatrick Steinhardt <ps@pks.im>
Fri, 14 Apr 2023 06:02:04 +0000 (14 08:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Apr 2023 17:27:52 +0000 (14 10:27 -0700)
treeae6e045f3f957d18fedf1699a8e64985a6d894b2
parentf3028418c3b68350aa810064c95283062c9157d6
t/helper: allow chmtime to print verbosely without modifying mtime

The `test-tool chmtime` helper allows us to both read and modify the
modification time of files. But while it is possible to only read the
mtimes of a file via `--get`, it is not possible to read the mtimes
and report them together with their respective file paths via the
`--verbose` flag without also modifying the mtime at the same time.

Fix this so that it is possible to call `test-tool chmtime --verbose
<files>...` without modifying any mtimes.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-chmtime.c