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

[PATCH 1/2] t7411: quote URLs

From
Stefan Beller <sbeller@google.com>
Date
Dec 27, 2016, 19:36 UTC
Message-ID
<20161227193605.12413-2-sbeller@google.com>
In-Reply-To
<20161227193605.12413-1-sbeller@google.com>

The variables may contain white spaces, so we need to quote them. By not quoting the variables we'd end up passing multiple arguments to git config, which doesn't fail for two arguments as value.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 t/t7411-submodule-config.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7411-submodule-config.sh b/t/t7411-submodule-config.sh
index 47562ce465..3646f28b40 100755
--- a/t/t7411-submodule-config.sh
+++ b/t/t7411-submodule-config.sh
@@ -120,8 +120,8 @@ test_expect_success 'reading of local configuration' '
 			"" submodule \
 				>actual &&
 		test_cmp expect_local_path actual &&
-		git config submodule.a.url $old_a &&
-		git config submodule.submodule.url $old_submodule &&
+		git config submodule.a.url "$old_a" &&
+		git config submodule.submodule.url "$old_submodule" &&
 		git config --unset submodule.a.path c
 	)
 '
-- 
2.11.0.rc2.50.g8bda6b2.dirty
Previous: Stefan BellerNext: Stefan Beller
Message 2 of 3 in “submodule config test cleanup”
  1. 0/2 submodule config test cleanupStefan Beller, Dec 27, 2016
  2. 1/2 t7411: quote URLsStefan Beller, Dec 27, 2016
  3. 2/2 t7411: test lookup of uninitialized submodulesStefan Beller, Dec 27, 2016

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.