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

[PATCH 3/3] t1306: check that XDG_CONFIG_HOME works

From
Jeff King <peff@peff.net>
Date
Jul 24, 2012, 11:54 UTC
Message-ID
<20120724115422.GB7353@sigill.intra.peff.net>
In-Reply-To
<20120724115305.GA7328@sigill.intra.peff.net>

This should override $HOME/.config, but we never actually tested it.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t1306-xdg-files.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/t/t1306-xdg-files.sh b/t/t1306-xdg-files.sh
index 1569596..4447949 100755
--- a/t/t1306-xdg-files.sh
+++ b/t/t1306-xdg-files.sh
@@ -113,6 +113,14 @@ test_expect_success 'Checking XDG attributes when HOME is unset' '
 	test_cmp expected actual
 '
 
+test_expect_success 'Prefer XDG_CONFIG_HOME to HOME/.config' '
+	echo "f: attr_f: foo" >expected &&
+	mkdir -p foo/git &&
+	echo "f attr_f=foo" >foo/git/attributes &&
+	XDG_CONFIG_HOME="foo" git check-attr -a f >actual &&
+	test_cmp expected actual
+'
+
 test_expect_success 'Checking attributes in both XDG and local attributes files' '
 	echo "f -attr_f" >.gitattributes &&
 	echo "f: attr_f: unset" >expected &&
-- 
1.7.11.3.4.g9f70dbb
Previous: Jeff KingNext: Matthieu Moy
Message 5 of 7 in “test-lib.sh: unset XDG_CONFIG_HOME”
  1. 1/3 test-lib.sh: unset XDG_CONFIG_HOMEJeff King, Jul 24, 2012
  2. 2/3 attr: make sure we have an xdg path before using itJeff King, Jul 24, 2012
  3. ignore: make sure we have an xdg path before using itMatthieu Moy, Jul 24, 2012
  4. Jeff KingJul 24, 2012
  5. 3/3 t1306: check that XDG_CONFIG_HOME worksJeff King, Jul 24, 2012
  6. Matthieu MoyJul 24, 2012
  7. Jeff KingJul 24, 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.