Re: [PATCH v2 4/6] t5701: add setup test to remove side-effect dependency
- From
Usman Akinyemi <usmanakinyemi202@gmail.com>
- Date
- Jan 21, 2025, 13:43 UTC
- Message-ID
- <CAPSxiM90EGU+eYN9KTpOXX4nK3Rhu605CCQd+-TzYK51svHStg@mail.gmail.com>
- In-Reply-To
- <xmqqy0z52rg4.fsf@gitster.g>
On Tue, Jan 21, 2025 at 1:22 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> > Usman Akinyemi <usmanakinyemi202@gmail.com> writes: > > > Yeah, that is true, I could not notice this as the next commit of the > > patch series > > was able to fix it. I will change it to "echo", with this, it will be better. > > If we want to prepare ourselves against any arbitrary garbage the > builder may throw at us, using printf with _fixed_ format and feed > the potentially arbitrary garbage as its parameter to be > interpolated is the safest approach, so writing it as > > printf "agent=git/%s\n" "$(git version | cut ...)" > > would signal the readers that whoever wrote it knew what they were > doing and was being extra careful. > > THanks.
Yeah, I will add this in the next iteration. Thanks.