From: Junio C Hamano <gitster@pobox.com>
To: Adrian Ratiu <adrian.ratiu@collabora.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH] t1800: add &&-chains to test helper functions
Date: Wed, 08 Apr 2026 10:16:15 -0700 [thread overview]
Message-ID: <xmqqpl49z82o.fsf@gitster.g> (raw)
In-Reply-To: <20260408161148.2064854-1-adrian.ratiu@collabora.com> (Adrian Ratiu's message of "Wed, 8 Apr 2026 19:11:48 +0300")
Adrian Ratiu <adrian.ratiu@collabora.com> writes:
> Add the missing &&'s so we properly propagate failures
> between commands in the hook helper functions.
>
> Also add a missing mkdir -p arg (found by adding the &&).
>
> Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
> ---
> This is a small fix reported by Szeder, based on the master branch
Thanks, both of you. Will directly apply on 'master'.
> GitHub branch: https://github.com/10ne1/git/tree/refs/heads/dev/aratiu/tests-add-missing-and-chains
> Clean CI run: https://github.com/10ne1/git/actions/runs/24137982261
> ---
> t/t1800-hook.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/t/t1800-hook.sh b/t/t1800-hook.sh
> index 96749fc06d..33decc66c0 100755
> --- a/t/t1800-hook.sh
> +++ b/t/t1800-hook.sh
> @@ -6,16 +6,16 @@ test_description='git-hook command and config-managed multihooks'
> . "$TEST_DIRECTORY"/lib-terminal.sh
>
> setup_hooks () {
> - test_config hook.ghi.command "/path/ghi"
> - test_config hook.ghi.event pre-commit --add
> - test_config hook.ghi.event test-hook --add
> - test_config_global hook.def.command "/path/def"
> + test_config hook.ghi.command "/path/ghi" &&
> + test_config hook.ghi.event pre-commit --add &&
> + test_config hook.ghi.event test-hook --add &&
> + test_config_global hook.def.command "/path/def" &&
> test_config_global hook.def.event pre-commit --add
> }
>
> setup_hookdir () {
> - mkdir .git/hooks
> - write_script .git/hooks/pre-commit <<-EOF
> + mkdir -p .git/hooks &&
> + write_script .git/hooks/pre-commit <<-EOF &&
> echo \"Legacy Hook\"
> EOF
> test_when_finished rm -rf .git/hooks
prev parent reply other threads:[~2026-04-08 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 16:11 [PATCH] t1800: add &&-chains to test helper functions Adrian Ratiu
2026-04-08 17:16 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqpl49z82o.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=adrian.ratiu@collabora.com \
--cc=git@vger.kernel.org \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox