diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-04-11 13:40:20 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-11 21:23:23 (GMT) |
commit | 7c2dfca7e81538b3d979b85b5bd023358d4d79eb (patch) | |
tree | 703826db47c1ac9b73d1802a4ccc0df8f12f8f04 /t/t5611-clone-config.sh | |
parent | 9fadedd637b312089337d73c3ed8447e9f0aa775 (diff) | |
download | git-7c2dfca7e81538b3d979b85b5bd023358d4d79eb.zip git-7c2dfca7e81538b3d979b85b5bd023358d4d79eb.tar.gz git-7c2dfca7e81538b3d979b85b5bd023358d4d79eb.tar.bz2 |
t: consolidate the `is_hidden` functions
The `is_hidden` function can be used (only on Windows) to determine
whether a directory or file have their `hidden` flag set.
This function is duplicated between two test scripts. It is better to
move it into `test-lib-functions.sh` so that it is reused.
This patch is best viewed with `--color-moved`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5611-clone-config.sh')
-rwxr-xr-x | t/t5611-clone-config.sh | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh index 60c1ba9..c861e12 100755 --- a/t/t5611-clone-config.sh +++ b/t/t5611-clone-config.sh @@ -92,13 +92,6 @@ test_expect_success 'clone -c remote.<remote>.fetch=<refspec> --origin=<name>' ' test_cmp expect actual ' -# 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 - return 1 -} - test_expect_success MINGW 'clone -c core.hideDotFiles' ' test_commit attributes .gitattributes "" && rm -rf child && |