From 7611a72be2cf6488c4d57ac0545469ff7ae89760 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Sun, 25 Nov 2012 00:25:45 -0500 Subject: new: Skip ignored broken symlinks We now test for user ignore patterns before attempting to determine if a directory entry is itself a directory. As a result, we no longer abort for broken symlinks if the user has explicitly ignored them. This fixes the test added in the previous patch. It also slightly changes the debug output checked by another test of ignores. --- test/new | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/new b/test/new index ea678d7c..3eff2fe9 100755 --- a/test/new +++ b/test/new @@ -225,7 +225,12 @@ touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file output=$(NOTMUCH_NEW --debug 2>&1 | sort) test_expect_equal "$output" \ "(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/.git +(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file +(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/ignored_file +(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/one/ignored_file +(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file (D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/three/.git +(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.git (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file @@ -237,7 +242,6 @@ No new mail." test_begin_subtest "Don't stop for ignored broken symlinks" -test_subtest_known_broken notmuch config set new.ignore .git ignored_file .ignored_hidden_file broken_link ln -s i_do_not_exist "${MAIL_DIR}"/broken_link output=$(NOTMUCH_NEW 2>&1) -- cgit v1.2.3