diff options
Diffstat (limited to 'app/Issue.hs')
-rw-r--r-- | app/Issue.hs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/app/Issue.hs b/app/Issue.hs index fabd88f..847e014 100644 --- a/app/Issue.hs +++ b/app/Issue.hs @@ -54,20 +54,12 @@ id issue = fromMatch :: G.Result -> G.Match -> IO (Maybe Issue) fromMatch result match = do rawProvenance <- - fmap (map (T.splitOn "\NUL") . T.lines . decodeUtf8 . toStrict) $ + fmap (T.splitOn "\NUL" . head . T.lines . decodeUtf8 . toStrict) $ sh $ - ( fromString - ( printf - "git --no-pager log --reverse -S\"$(cat %s | tail -n+%d | head -%d)\" --format='%%H%%x00%%ai%%x00%%ae%%x00%%an' -- %s" - (quote result.file) - match.start.row - (match.end.row - match.start.row + 1) - (quote result.file) - ) - ) + "git show --format='%H%x00%ai%x00%ae%x00%an'" let provenance = case rawProvenance of - (firstCommit' : rawDate : authorEmail : authorName : _) : _ -> + firstCommit' : rawDate : authorEmail : authorName : _ -> let date = read (T.unpack rawDate) in Just Provenance |