]> git.99rst.org Git - git.git/commit
t9902: fix use of `read` with `set -e`
authorPatrick Steinhardt <redacted>
Tue, 21 Apr 2026 07:34:24 +0000 (09:34 +0200)
committerJunio C Hamano <redacted>
Wed, 22 Apr 2026 22:53:36 +0000 (15:53 -0700)
commit1ecf6538263cf81c151f2e720cd73fde3d50a07e
treeb1d536d77e3e117af0a7cecfcf3655c3ea153936
parent090af9957c14915461f302f422d2c147b3e9175b
t9902: fix use of `read` with `set -e`

In t9902 we're using the `read` builtin to read some values into a
variable. This is done by using `-d ""`, which cause us to read until
the end of the heredoc. As the read is terminated by EOF, the command
will end up returning a non-zero error code. This hasn't been an issue
until now as we didn't run with `set -e`, but that'll change in a
subsequent commit.

Prepare for this change by not using read at all, as we can simply store
the multi-line value directly.

Suggested-by: SZEDER Gábor <redacted>
Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t9902-completion.sh
git clone https://git.99rst.org/PROJECT