04.05.2020 20:57, Antoine Beaupré wrote: > On 2020-05-01 19:10:53, Alexander Galanin wrote: >> Package: etckeeper >> Version: 1.18.12-1.1 >> Followup-For: Bug #884987 >> >> The problem is still present in 1.18.12-1. >> >> Here is my patch for skipping mercurial's data directory: >> >> +++ a/pre-commit.d/20warn-problem-files 2020-05-01 18:52:57.654521579 >> +0300 >> --- b/pre-commit.d/20warn-problem-files 2020-05-01 19:05:01.103549539 >> +0300 >> @@ -10,7 +10,7 @@ >> hardlinks=$(find . -type f ! -links 1 | exclude_internal ) || true >> elif [ "$VCS" = hg ]; then >> special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || >> true >> - hardlinks=$(find . -type f ! -links 1 -exec hg status {} \; | >> exclude_internal ) || true >> + hardlinks=$(find . \( -name .hg -prune \) -o \( -type f ! -links 1 >> -exec hg status {} \; \) ) || true > > I don't get it: that's what `| exclude_internal` is designed to do, how > is it not skipping those directories?
Error messages are coming from `hg status` which is executed _before_ exclude_internal filter. So we need to filter mercurial's internal directory before 'hg status' call. -- Alexander Galanin