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

[PATCH 2/2] Complain in tests about aliases not working for, alternative config files

From
RPRune Schjellerup Philosof <rune@philosof.dk>
Date
Mar 2, 2012, 11:00 UTC
Message-ID
<4F50A83C.9090407@philosof.dk>
From c412e07ba45be32f2158c5668752354a979734d6 Mon Sep 17 00:00:00 2001
From: Rune Philosof <rune.git@philosof.dk>
Date: Fri, 2 Mar 2012 11:13:55 +0100
Subject: [PATCH 2/2] Complain in tests about aliases not working for
 alternative config files

Aliases does not work when set in a configuration file specified by the GIT_CONFIG variable.

Signed-off-by: Rune Philosof <rune.git@philosof.dk>
---
 t/t1300-repo-config.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 81ccad5..433ef94 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -955,6 +955,17 @@ test_expect_success 'git -c works with aliases of
builtins' '
 	test_cmp expect actual
 '

+test_expect_failure 'aliases work with alternative config' '
+	(
+		GIT_CONFIG=alias &&
+		export GIT_CONFIG &&
+		git config alias.altconfig "-c foo.check=bar config foo.check" &&
+		echo bar >expect &&
+		git altconfig >actual &&
+		test_cmp expect actual
+	)
+'
+
 test_expect_success 'git -c does not split values on equals' '
 	echo "value with = in it" >expect &&
 	git -c core.foo="value with = in it" config core.foo >actual &&
-- 
1.7.5.4
Message 1 of 1 in “Complain in tests about aliases not working for, alternative config files”
  1. 2/2 Complain in tests about aliases not working for, alternative config filesRune Schjellerup Philosof, Mar 2, 2012

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.