Merge branch 'jk/tzoffset-fix' into maint
[gitweb.git] / t / t5611-clone-config.sh
index 27d730c0a7209480c5349e4ace65f92c9e75c699..e4850b778c2f20df02ce187cc8cd057df2759d7d 100755 (executable)
@@ -37,4 +37,24 @@ test_expect_success 'clone -c config is available during clone' '
        test_cmp expect child/file
 '
 
+# 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 &&
+       git clone -c core.hideDotFiles=false . child &&
+       ! is_hidden child/.gitattributes &&
+       rm -rf child &&
+       git clone -c core.hideDotFiles=dotGitOnly . child &&
+       ! is_hidden child/.gitattributes &&
+       rm -rf child &&
+       git clone -c core.hideDotFiles=true . child &&
+       is_hidden child/.gitattributes
+'
+
 test_done