diff mbox series

[01/16] t/test-lib: avoid using git on LHS of pipe

Message ID 6750cc17bc439c14e752606fbb7271086a802eaf.1647033303.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Builtin FSMonitor Part 2.5 | expand

Commit Message

Jeff Hostetler March 11, 2022, 9:14 p.m. UTC
From: Jeff Hostetler <jeffhost@microsoft.com>

fixup! help: include fsmonitor--daemon feature flag in version info

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
 t/test-lib.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Junio C Hamano March 14, 2022, 6 a.m. UTC | #1
"Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Jeff Hostetler <jeffhost@microsoft.com>
>
> fixup! help: include fsmonitor--daemon feature flag in version info

Do you want me to kick part-2 out of 'next' so that these can be
squashed into the original commits that need fixing?  If not, you
would want to have a real commit log message instead.

The patch text looks good, even though I had to see if 'output' may
clobber or collide with names used in tests that want the
prerequisite.

> Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
> ---
>  t/test-lib.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 46cd596e7f5..5d819c1bc11 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -1803,5 +1803,6 @@ GIT_TEST_MAINT_SCHEDULER="none:exit 1"
>  # Does this platform support `git fsmonitor--daemon`
>  #
>  test_lazy_prereq FSMONITOR_DAEMON '
> -	git version --build-options | grep "feature:" | grep "fsmonitor--daemon"
> +	git version --build-options >output &&
> +	grep "feature: fsmonitor--daemon" output
>  '
diff mbox series

Patch

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 46cd596e7f5..5d819c1bc11 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1803,5 +1803,6 @@  GIT_TEST_MAINT_SCHEDULER="none:exit 1"
 # Does this platform support `git fsmonitor--daemon`
 #
 test_lazy_prereq FSMONITOR_DAEMON '
-	git version --build-options | grep "feature:" | grep "fsmonitor--daemon"
+	git version --build-options >output &&
+	grep "feature: fsmonitor--daemon" output
 '