On Thu, Oct 17, 2019 at 7:17 PM Denton Liu <liu.den...@gmail.com> wrote:
> Instead of using `test -n` or `test -z`, replace them respectively with
> invocations of test_file_not_empty() and test_must_be_empty().
>
> Signed-off-by: Denton Liu <liu.den...@gmail.com>
> ---
> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
> @@ -206,15 +206,18 @@ test_expect_success 'fail if the index has unresolved 
> entries' '
> -       test -z "$(git ls-files -u)" &&
> +       git ls-files -u >unmerged &&
> +       test_must_be_empty unmerged &&

A better justification for these change (and all others in this patch)
is that the original threw away the exit code of the "git ls-files -u"
invocation, whereas the new code takes the exit code into account. The
commit message perhaps instead ought to focus on that benefit.

Reply via email to