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 @@ -354,4 +354,32 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
354
354
test_path_is_dir realgitdir/refs
355
355
'
356
356
357
+ # Tests for the hidden file attribute on windows
358
+ is_hidden () {
359
+ test " 1" -eq " $( echo puts [file attributes $1 -h idden]| tclsh) "
360
+ }
361
+
362
+ test_expect_success MINGW ' plain hidden' '
363
+ rm -rf newdir &&
364
+ (
365
+ unset GIT_DIR GIT_WORK_TREE
366
+ mkdir newdir &&
367
+ cd newdir &&
368
+ git init &&
369
+ is_hidden .git
370
+ ) &&
371
+ check_config newdir/.git false unset
372
+ '
373
+
374
+ test_expect_success MINGW ' plain bare not hidden' '
375
+ rm -rf newdir &&
376
+ (
377
+ unset GIT_DIR GIT_WORK_TREE GIT_CONFIG
378
+ mkdir newdir &&
379
+ cd newdir &&
380
+ git --bare init
381
+ ) &&
382
+ ! is_hidden newdir
383
+ '
384
+
357
385
test_done
You can’t perform that action at this time.
0 commit comments