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

[PATCH] test-lib.sh: show git init output when in verbose mode

From
LWLea Wiemann <lewiemann@gmail.com>
Date
Jun 26, 2008, 18:35 UTC
Message-ID
<1214505319-24946-1-git-send-email-LeWiemann@gmail.com>
Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
---

I've had a hard-to-spot problem where git would crash due to a missing library, and this solved it. :) IMHO there's no reason not to show the git init output when --verbose is given.

(FD 3 and 4 are the streams where verbose output is redirected; in non-verbose mode they're redirected to /dev/null.)

 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a9fc621..8e2849b 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -408,7 +408,7 @@ test_create_repo () {
 	repo="$1"
 	mkdir "$repo"
 	cd "$repo" || error "Cannot setup test environment"
-	"$GIT_EXEC_PATH/git" init "--template=$GIT_EXEC_PATH/templates/blt/" >/dev/null 2>&1 ||
+	"$GIT_EXEC_PATH/git" init "--template=$GIT_EXEC_PATH/templates/blt/" >&3 2>&4 ||
 	error "cannot run git init -- have you built things yet?"
 	mv .git/hooks .git/hooks-disabled
 	cd "$owd"
-- 
1.5.6.1.184.g27776.dirty
Message 1 of 1 in “test-lib.sh: show git init output when in verbose mode”
  1. test-lib.sh: show git init output when in verbose modeLea Wiemann, Jun 26, 2008

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.