git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t6050-replace: don't disable stdin for the whole test script

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
May 7, 2018, 12:04 UTC
Message-ID
<20180507120407.4323-1-szeder.dev@gmail.com>

The test script 't6050-replace.sh' starts off with redirecting the whole test script's stdin from /dev/null. This redirection has been there since the test script was introduced in a3e8267225 (replace_object: add a test case, 2009-01-23), but the commit message doesn't explain why it was deemed necessary. AFAICT, it has never been necessary, and t6050 runs just fine and succeeds even without it, not only the current version but past versions as well.

Besides being unnecessary, this redirection is also harmful, as it prevents the test helper functions 'test_pause' and 'debug' from working properly in t6050, because we can't enter any commands to the shell and the debugger, respectively.

So let's remove that redirection.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 t/t6050-replace.sh | 2 --
 1 file changed, 2 deletions(-)
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index c630aba657..199fbc78a3 100755
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
@@ -4,8 +4,6 @@
 #
 test_description='Tests replace refs functionality'
 
-exec </dev/null
-
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
-- 
2.17.0.583.gcecc8b8e24
Next: Johannes Schindelin
Message 1 of 3 in “t6050-replace: don't disable stdin for the whole test script”
  1. t6050-replace: don't disable stdin for the whole test scriptSZEDER Gábor, May 7, 2018
  2. Johannes SchindelinMay 8, 2018
  3. SZEDER GáborMay 9, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.