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

trivial: use git-repo-config to detect if the test can be run on the repository

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jan 5, 2006, 11:55 UTC
Message-ID
<81b0412b0601050355v7fcecaeem7e04c6ccb062bc3@mail.gmail.com>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Subject: [PATCH] use git-repo-config
to detect if the test can be run on the repository
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 t/t4000-diff-format.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
a03836585a1bc3101c219a31f436d046f37782f2
diff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh
index beb6d8f..67b9681 100755
--- a/t/t4000-diff-format.sh
+++ b/t/t4000-diff-format.sh
@@ -26,6 +26,14 @@ rm -f path1
 test_expect_success \
     'git-diff-files -p after editing work tree.' \
     'git-diff-files -p >current'
+
+# that's as far as it comes
+if [ "$(git repo-config --get core.filemode)" = false ]
+then
+	say 'filemode disabled on the filesystem'
+	test_done
+fi
+
 cat >expected <<\EOF
 diff --git a/path0 b/path0
 old mode 100644
-- 
1.0.GIT
Message 1 of 1 in “trivial: use git-repo-config to detect if the test can be run on the repository”
  1. Alex RiesenJan 5, 2006

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.