Skip to content

Commit 7d09b41

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #3456 from jeffhostetler/try-v4-fsmonitor-part5
FSMonitor: deepening a directory causes confusing events
2 parents 2d4828e + 163c55a commit 7d09b41

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

t/t7527-builtin-fsmonitor.sh

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,16 @@ test_expect_success 'setup' '
261261
trace*
262262
EOF
263263
264+
mkdir -p T1/T2/T3/T4 &&
265+
echo 1 >T1/F1 &&
266+
echo 1 >T1/T2/F1 &&
267+
echo 1 >T1/T2/T3/F1 &&
268+
echo 1 >T1/T2/T3/T4/F1 &&
269+
echo 2 >T1/F2 &&
270+
echo 2 >T1/T2/F2 &&
271+
echo 2 >T1/T2/T3/F2 &&
272+
echo 2 >T1/T2/T3/T4/F2 &&
273+
264274
git -c core.useBuiltinFSMonitor= add . &&
265275
test_tick &&
266276
git -c core.useBuiltinFSMonitor= commit -m initial &&
@@ -354,6 +364,19 @@ verify_status() {
354364
echo HELLO AFTER
355365
}
356366

367+
move_directory_contents_deeper() {
368+
mkdir T1/_new_
369+
mv T1/[A-Z]* T1/_new_
370+
}
371+
372+
move_directory_up() {
373+
mv T1/T2/T3 T1
374+
}
375+
376+
move_directory() {
377+
mv T1/T2/T3 T1/T2/NewT3
378+
}
379+
357380
# The next few test cases confirm that our fsmonitor daemon sees each type
358381
# of OS filesystem notification that we care about. At this layer we just
359382
# ensure we are getting the OS notifications and do not try to confirm what
@@ -622,8 +645,8 @@ test_expect_success 'Matrix: setup for untracked-cache,fsmonitor matrix' '
622645
'
623646

624647
matrix_clean_up_repo () {
625-
git reset --hard HEAD
626648
git clean -fd
649+
git reset --hard HEAD
627650
}
628651

629652
matrix_try () {
@@ -688,6 +711,22 @@ do
688711
matrix_try $uc_val $fsm_val file_to_directory
689712
matrix_try $uc_val $fsm_val directory_to_file
690713

714+
# NEEDSWORK: On Windows the untracked-cache is buggy when FSMonitor
715+
# is DISABLED. Turn off a few test that cause it problems until
716+
# we can debug it.
717+
#
718+
try_moves="true"
719+
test_have_prereq UNTRACKED_CACHE,WINDOWS && \
720+
test $uc_val = true && \
721+
test $fsm_val = false && \
722+
try_moves="false"
723+
if test $try_moves = true
724+
then
725+
matrix_try $uc_val $fsm_val move_directory_contents_deeper
726+
matrix_try $uc_val $fsm_val move_directory_up
727+
matrix_try $uc_val $fsm_val move_directory
728+
fi
729+
691730
if test $fsm_val = true
692731
then
693732
test_expect_success "Matrix[uc:$uc_val][fsm:$fsm_val] disable fsmonitor at end" '

0 commit comments

Comments
 (0)