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

[StGit PATCH 4/5] Get rid of backticks in test-lib.sh

From
Karl Hasselström <kha@treskal.com>
Date
Apr 17, 2008, 21:13 UTC
Message-ID
<20080417211304.12809.55533.stgit@yoghurt>
In-Reply-To
<20080417210137.12809.88457.stgit@yoghurt>
The $(...) notation is just plain nicer.
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
 t/test-lib.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 87c143a..95e322e 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -307,13 +307,13 @@ test_cmp() {
 test_create_repo () {
 	test "$#" = 1 ||
 	error "bug in the test script: not 1 parameter to test-create-repo"
-	owd=`pwd`
+	owd=$(pwd)
 	repo="$1"
 	mkdir "$repo"
 	cd "$repo" || error "Cannot setup test environment"
 	git init >/dev/null 2>&1 || error "cannot run git init"
 	echo "empty start" | \
-	    git commit-tree `git write-tree` >.git/refs/heads/master 2>&4 || \
+	    git commit-tree $(git write-tree) >.git/refs/heads/master 2>&4 || \
 	    error "cannot run git commit"
 	mv .git/hooks .git/hooks-disabled
 	cd "$owd"
Previous: Karl HasselströmNext: Karl Hasselström
Message 5 of 7 in “test suite update”
  1. 0/5 test suite updateKarl Hasselström, Apr 17, 2008
  2. 1/5 If a patch is not changed when pushing, reuse the same commit objectKarl Hasselström, Apr 17, 2008
  3. 2/5 Use hardcoded author and committer names in testsKarl Hasselström, Apr 17, 2008
  4. 3/5 Steal more test-lib.sh updates from gitKarl Hasselström, Apr 17, 2008
  5. 4/5 Get rid of backticks in test-lib.shKarl Hasselström, Apr 17, 2008
  6. 5/5 Use test_cmp instead of diff -u in the test suiteKarl Hasselström, Apr 17, 2008
  7. Karl HasselströmApr 17, 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.