Re: [PATCH v4 6/6] tests: don't lose misc "git" exit codes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 27, 2022, 23:17 UTC
- Message-ID
- <xmqqo7roqvw7.fsf@gitster.g>
- In-Reply-To
- <6efe13ea-8782-2337-1626-9687e2219680@dunelm.org.uk>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 7 quoted lines
>> - test -z "$(git diff file)" >> ... >> + git diff file >out && >> + test_must_be_empty out > > "git diff --exit-code file" would suffice here, we don't need to > redirect the output and check that it is empty.
Yes, but the test is trying to be faithful to not just the intent but also the implementation of the original, I think.