aboutsummaryrefslogtreecommitdiff
path: root/Git/CheckIgnore.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-11-06 15:39:51 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-11-06 15:39:51 -0400
commit7c7314ae73ce9b2a6059d80e7c356419ed40093c (patch)
treed9d8e3211cedc77847d17513413d1d7a9e36c890 /Git/CheckIgnore.hs
parent90d833e44240dd0a83fd2439fa1a23e490959235 (diff)
work around git check-ignore --batch bad exit status bug, and bring back import -J
Diffstat (limited to 'Git/CheckIgnore.hs')
-rw-r--r--Git/CheckIgnore.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Git/CheckIgnore.hs b/Git/CheckIgnore.hs
index 322088f89..7d30e5ada 100644
--- a/Git/CheckIgnore.hs
+++ b/Git/CheckIgnore.hs
@@ -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