aboutsummaryrefslogtreecommitdiffstats
path: root/app/History.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/History.hs')
-rw-r--r--app/History.hs15
1 files changed, 5 insertions, 10 deletions
diff --git a/app/History.hs b/app/History.hs
index 396c309..c04d16a 100644
--- a/app/History.hs
+++ b/app/History.hs
@@ -95,12 +95,10 @@ cached commit func = do
pure blob
listIssuesCurrent :: [FilePath] -> IO [Issue]
-listIssuesCurrent files = do
+listIssuesCurrent paths = do
worktree <- getCurrentDirectory
- concat
- <$> catch
- (getIssuesPar worktree =<< (getFiles worktree files))
- (\(InvalidTreeGrepperResult e) -> die e)
+ files <- getFiles worktree paths
+ concat <$> (catch (getIssuesPar worktree files) (\(InvalidTreeGrepperResult e) -> die e))
listIssuesOf :: Text -> IO [Issue]
listIssuesOf commit = do
@@ -109,11 +107,8 @@ listIssuesOf commit = do
let worktree = tmp </> unpack commit
sh_ (fromString (printf "git worktree add --detach %s %s" (quote worktree) (quote (unpack commit))))
pure worktree
-
- concat
- <$> catch
- (getIssuesPar worktree =<< (getFilesChanged worktree))
- (\(InvalidTreeGrepperResult e) -> die e)
+ files <- getFilesChanged worktree
+ concat <$> catch (getIssuesPar worktree files) (\(InvalidTreeGrepperResult e) -> die e)
forgetGetIssuesExceptions :: UnknownFileExtension -> IO [a]
forgetGetIssuesExceptions _ = pure []