Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-04-11 16:40:21 +0300
committerJunio C Hamano <gitster@pobox.com>2020-04-12 00:23:25 +0300
commit9814d0a4ad0f9670b5959939f38dd42f9a7d83b6 (patch)
tree05d7564839431c082222a4894b29a0e016ac3761 /t/test-lib-functions.sh
parent7c2dfca7e81538b3d979b85b5bd023358d4d79eb (diff)
mingw: make test_path_is_hidden more robust
This function uses Windows' system tool `attrib` to determine the state of the hidden flag of a file or directory. We should not actually expect the first `attrib.exe` in the PATH to be the one we are looking for. Or that it is in the PATH, for that matter. Let's use the full path to the tool instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 7a7e7a3831..2f81463a24 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -1547,6 +1547,6 @@ test_bitmap_traversal () {
# Tests for the hidden file attribute on windows
is_hidden () {
# Use the output of `attrib`, ignore the absolute path
- case "$(attrib "$1")" in *H*?:*) return 0;; esac
+ case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
return 1
}