Re: [PATCH 1/3] t5334: expose shared `nth_line()` helper
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 13, 2026, 08:48 UTC
- Message-ID
- <an2E6OV1Fr7wKFhn@pks.im>
- In-Reply-To
- <a3a51a1ebbf1ba67592a1c884ae7ace526c6aae1.1781294771.git.me@ttaylorr.com>
On Fri, Jun 12, 2026 at 04:07:08PM -0400, Taylor Blau wrote:
Show 14 quoted lines
> diff --git a/t/lib-midx.sh b/t/lib-midx.sh
> index e38c609604c..b522dbdb0f4 100644
> --- a/t/lib-midx.sh
> +++ b/t/lib-midx.sh
> @@ -34,3 +34,9 @@ compare_results_with_midx () {
> midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
> '
> }
> +
> +nth_line() {
> + local n="$1"
> + shift
> + awk "NR==$n" "$@"
> +}It feels a bit weird to have such a general function in "lib-midx.sh", but so be it.
Patrick