diff options
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Ref.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Git/Ref.hs b/Git/Ref.hs index 117ead8f2..0197ae789 100644 --- a/Git/Ref.hs +++ b/Git/Ref.hs @@ -41,8 +41,8 @@ sha branch repo = process . L.unpack <$> showref repo matching :: Ref -> Repo -> IO [(Ref, Branch)] matching ref repo = do r <- pipeRead [Param "show-ref", Param $ show ref] repo - return $ nubBy uref $ map (gen . words . L.unpack) (L.lines r) + return $ nubBy uniqref $ map (gen . L.unpack) (L.lines r) where - gen l = (Ref $ head l, Ref $ last l) - uref (a, _) (b, _) = a == b - + uniqref (a, _) (b, _) = a == b + gen l = let (r, b) = separate (== ' ') l in + (Ref r, Ref b) |