more partial function removal
Left a few Prelude.head's in where it was checked not null and too hard to remove, etc.
This commit is contained in:
parent
b7e0d39abb
commit
95d2391f58
24 changed files with 73 additions and 78 deletions
|
@ -154,13 +154,13 @@ excludeReferenced l = do
|
|||
(S.fromList l)
|
||||
where
|
||||
-- Skip the git-annex branches, and get all other unique refs.
|
||||
refs = map (Git.Ref . last) .
|
||||
nubBy cmpheads .
|
||||
refs = map (Git.Ref . snd) .
|
||||
nubBy uniqref .
|
||||
filter ourbranches .
|
||||
map words . lines . L.unpack
|
||||
cmpheads a b = head a == head b
|
||||
map (separate (== ' ')) . lines . L.unpack
|
||||
uniqref (a, _) (b, _) = a == b
|
||||
ourbranchend = '/' : show Annex.Branch.name
|
||||
ourbranches ws = not $ ourbranchend `isSuffixOf` last ws
|
||||
ourbranches (_, b) = not $ ourbranchend `isSuffixOf` b
|
||||
removewith [] s = return $ S.toList s
|
||||
removewith (a:as) s
|
||||
| s == S.empty = return [] -- optimisation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue