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

From: Đoàn Trần Công Danh <[email-masked]>
Date: Wed, 30 Jun 2021 18:01:37 +0700

On 2021-06-29 20:36:36-0700, Junio C Hamano <[email-masked]> wrote:
> Eric Sunshine <[email-masked]> writes:
> 
> > 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())?
> 
> Could be, except that I recall we saw extra noises like --out/--err
> that weren't used and contaminating the current working directory,
> which are gone from the latest iteration.

Yes, in v{1,2}, there's the extra noises of --out and --err,
but it's gone in v3.

I guess you're thinking about the contamination of $PWD iff it's not
a git worktree. That could be simplified by BUG-ging if $PWD is not
a git worktree.

Maybe, you're thinking about the extra noises to handle the failure run
of command under check? That could be dropped, too.

Would you mind looking at v3 1/4 again to see what is your opinion
there? I don't mind re-roll a same or simplified version of v3,
with s/test_line_count_cmd/test_output_wc_l/ if you see fit.

> The simplification
> compared to that iteration is quite welcome---it made the resulting
> code that uses the helper easier to follow compared to the earlier
> attempts.  But this round simplifies it too much and the results got
> harder to follow by burying the command name in the helper and made
> it less obvious that the last part of the helper's parameters are
> arguments given to ls-files, I would think.

-- 
Danh