work around git check-ignore --batch bad exit status bug, and bring back import -J

This commit is contained in:
Joey Hess 2015-11-06 15:39:51 -04:00
parent 7938b87864
commit 53db9d0b5c
Failed to extract signature
3 changed files with 10 additions and 3 deletions

View file

@ -57,8 +57,10 @@ supportedGitVersion = do
v <- Git.Version.installed
return $ v >= Git.Version.normalize "1.8.4"
{- For some reason, check-ignore --batch always exits nonzero,
- so ignore any error. -}
checkIgnoreStop :: CheckIgnoreHandle -> IO ()
checkIgnoreStop = CoProcess.stop
checkIgnoreStop = void . tryIO . CoProcess.stop
{- Returns True if a file is ignored. -}
checkIgnored :: CheckIgnoreHandle -> FilePath -> IO Bool