Re: [PATCH v4 1/2] t6400: preserve git ls-files exit status code
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 30, 2021, 01:57 UTC
- Message-ID
- <CAPig+cRu9Sh7gKi37Hj9nj+A0zZvmrrJgaVZepsD0Y-618tmvw@mail.gmail.com>
- In-Reply-To
- <xmqqk0mcuw0e.fsf@gitster.g>
On Tue, Jun 29, 2021 at 6:49 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> 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())?