Re: [PATCH v2 12/12] t0612: add tests to exercise Git/JGit reftable compatibility
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 8, 2024, 16:22 UTC
- Message-ID
- <ZhQZsq5_NyXmWM-b@tanuki>
- In-Reply-To
- <xmqqpluzet2z.fsf@gitster.g>
On Mon, Apr 08, 2024 at 09:07:32AM -0700, Junio C Hamano wrote:
Show 19 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
> > I was going to suggest that you could accomplish this more easily
> > directly in shell (without employing `awk`):
> >
> > {
> > echo start &&
> > printf "create refs/heads/branch-%d HEAD\n" $(test_seq 0 9999) &&
> > echo commit
> > } >input &&
> >
> > but then I realized that that could potentially run afoul of
> > command-line length limit on some platform due to the 0-9999 sequence.
>
> As xargs is supposed to know the system limit, perhaps
>
> test_seq 0 9999 | xargs printf "...%d...\n"
>
> should work?Is there a reason why we want to avoid using awk(1) in the first place? We use it in several other tests and I don't think that the resulting code is all that bad.
Patrick