Thread (29 messages) flat view 29 messages, 5 authors, 2021-07-04

Re: [PATCH v4 1/2] t6400: preserve git ls-files exit status code

From: Eric Sunshine <hidden>
Date: 2021-06-30 01:58:13

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())?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help