summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-vc-list-files-git.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-tests/test-vc-list-files-git.sh')
-rwxr-xr-xgnulib-tests/test-vc-list-files-git.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/gnulib-tests/test-vc-list-files-git.sh b/gnulib-tests/test-vc-list-files-git.sh
index 3359ffb..ab10800 100755
--- a/gnulib-tests/test-vc-list-files-git.sh
+++ b/gnulib-tests/test-vc-list-files-git.sh
@@ -1,11 +1,11 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -16,12 +16,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. */
-: ${srcdir=.}
+: "${srcdir=.}"
. "$srcdir/init.sh"; path_prepend_ .
tmpdir=vc-git-$$
GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE
+# Ignore local git configurations that may interact badly with
+# commands below. For example, if the user has set
+# commit.gpgsign=true in ~/.gitconfig the 'git commit' below will
+# require a OpenPGP private key operation which trigger PIN prompts
+# and unwanted hardware access on the developer's machine.
+GIT_CONFIG_GLOBAL=/dev/null; export GIT_CONFIG_GLOBAL
+
fail=1
mkdir $tmpdir && cd $tmpdir &&
# without git, skip the test