Skip to content

Commit 763bc75

Browse files
committed
Merge branch 'robustify-is-hidden-tests'
In Git for Windows, there is an option to mark the .git directory as hidden. Our test cases verify this by using the system utility `attrib.exe`. This file name is unfortunately quite generic, and overlaps with a Unix-y utility that might be hiding the system one in the `PATH`. Let's specify explicitly which `attrib` to use. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents ce5cc50 + e8dc5b6 commit 763bc75

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/t0001-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
412412
# Tests for the hidden file attribute on windows
413413
is_hidden () {
414414
# Use the output of `attrib`, ignore the absolute path
415-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
415+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
416416
return 1
417417
}
418418

t/t5611-clone-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ test_expect_success 'clone -c remote.<remote>.fetch=<refspec> --origin=<name>' '
9595
# Tests for the hidden file attribute on windows
9696
is_hidden () {
9797
# Use the output of `attrib`, ignore the absolute path
98-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
98+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
9999
return 1
100100
}
101101

0 commit comments

Comments
 (0)