File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -339,4 +339,32 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
339
339
test_path_is_dir realgitdir/refs
340
340
'
341
341
342
+ # Tests for the hidden file attribute on windows
343
+ is_hidden () {
344
+ test " 1" -eq " $( echo puts [file attributes $1 -h idden]| tclsh) "
345
+ }
346
+
347
+ test_expect_success MINGW ' plain hidden' '
348
+ rm -rf newdir &&
349
+ (
350
+ unset GIT_DIR GIT_WORK_TREE
351
+ mkdir newdir &&
352
+ cd newdir &&
353
+ git init &&
354
+ is_hidden .git
355
+ ) &&
356
+ check_config newdir/.git false unset
357
+ '
358
+
359
+ test_expect_success MINGW ' plain bare not hidden' '
360
+ rm -rf newdir &&
361
+ (
362
+ unset GIT_DIR GIT_WORK_TREE GIT_CONFIG
363
+ mkdir newdir &&
364
+ cd newdir &&
365
+ git --bare init
366
+ ) &&
367
+ ! is_hidden newdir
368
+ '
369
+
342
370
test_done
You can’t perform that action at this time.
0 commit comments