summaryrefslogtreecommitdiff
path: root/Git/Remote.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-06-26 12:15:27 -0400
committerJoey Hess <joeyh@joeyh.name>2017-06-26 12:15:55 -0400
commit63f9aba33b45e5bab688ffaa5e4182801c152828 (patch)
tree1f4e16640503b27bbd0f33241cbe1cb2c4a4eb89 /Git/Remote.hs
parentc799b05deae723690bfac5e867f7985e8f800d0d (diff)
downloadgit-repair-63f9aba33b45e5bab688ffaa5e4182801c152828.tar.gz
merge from git-annex
Removes dependency on MissingH, adding a dependency on split instead. This commit was sponsored by Brock Spratlen on Patreon.
Diffstat (limited to 'Git/Remote.hs')
-rw-r--r--Git/Remote.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Git/Remote.hs b/Git/Remote.hs
index 717b540..f6eaf93 100644
--- a/Git/Remote.hs
+++ b/Git/Remote.hs
@@ -74,9 +74,9 @@ parseRemoteLocation s repo = ret $ calcloc s
(bestkey, bestvalue) = maximumBy longestvalue insteadofs
longestvalue (_, a) (_, b) = compare b a
insteadofs = filterconfig $ \(k, v) ->
- startswith prefix k &&
- endswith suffix k &&
- startswith v l
+ prefix `isPrefixOf` k &&
+ suffix `isSuffixOf` k &&
+ v `isPrefixOf` l
filterconfig f = filter f $
concatMap splitconfigs $ M.toList $ fullconfig repo
splitconfigs (k, vs) = map (\v -> (k, v)) vs