From 9975f0541df53c0aa4de16d70e8149e00d3973d1 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 13 Apr 2021 10:17:36 -0400 Subject: Doc fix and factor for readibility --- Biz/Devalloc.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Biz') diff --git a/Biz/Devalloc.hs b/Biz/Devalloc.hs index 7112020..32fa7f9 100644 --- a/Biz/Devalloc.hs +++ b/Biz/Devalloc.hs @@ -1746,8 +1746,8 @@ lastTouched bareRepo path = do where calculateAge now n = round <| Time.diffUTCTime now n / Time.nominalDay --- | Given a git dir and a path inside the git repo, return a list of tuples --- with number of commits and author. +-- | Given a git dir and a path inside the git repo, get information about the +-- authors. authorsFor :: FilePath -> FilePath -> @@ -1770,12 +1770,12 @@ authorsFor gitDir path = /> Text.pack /> Text.lines /> map (Text.break (== '\t')) - /> map - ( \(commits, author) -> - ( Text.strip commits, - Text.strip <| Text.takeWhile (/= '<') author, - Text.strip <| Text.dropAround (`elem` ['<', '>']) <| Text.dropWhile (/= '<') author - ) + /> map parseAuthor + where + parseAuthor (commits, author) = + ( Text.strip commits, + Text.strip <| Text.takeWhile (/= '<') author, + Text.strip <| Text.dropAround (`elem` ['<', '>']) <| Text.dropWhile (/= '<') author ) spliceCreds :: User -> Text -> Text -- cgit v1.2.3