On Tue, Jun 29, 2021 at 6:49 PM Junio C Hamano [off-list ref] wrote:
I wonder if it is worth adding a single copy that forces the callers
to spell out the command name in test-lib.sh and make the above into
something like
test_output_wc_l = 5 ls-files -s
or even
test_output_wc_l = 5 git ls-files -s
That way, it is easier to see what command is being run (yes, I know
you have _ls_files_ in the middle of the name of the custom helper,
but the thing is that "-s" and "_ls_files_" in the middle of the
helper are so far apart that it is not immediately obvious what the
argument "-s" is about), and by not having two identical copies, we
have less risk of them drifting apart.
Hmm?
I may be misunderstanding your suggestion, but isn't the proposed
test_output_wc_l() function the same as what Danh had originally
implemented several re-rolls back (though he named it
test_line_count_cmd())?