diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2011-11-15 14:06:38 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2011-11-15 14:06:38 -0400 |
commit | 7d05ca1d6d01f7e9f8b2acdebac2b656e178a32c (patch) | |
tree | 2d4e0459bd3a904536be188387daa9349e93a7c5 | |
parent | 3c4537111509ea61138592a254a3a55a185cee23 (diff) |
Fix support for insteadOf url remapping. Closes: #644278
-rw-r--r-- | Git.hs | 7 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 5 insertions, 3 deletions
@@ -523,13 +523,14 @@ genRemote s repo = gen $ calcloc s | null insteadofs = l | otherwise = replacement ++ drop (length replacement) l where - replacement = take (length bestkey - length prefix) bestkey + replacement = drop (length "url.") $ + take (length bestkey - length suffix) bestkey bestkey = fst $ maximumBy longestvalue insteadofs longestvalue (_, a) (_, b) = compare b a insteadofs = filterconfig $ \(k, v) -> - endswith prefix k && + endswith suffix k && startswith v l - prefix = ".insteadof" + suffix = ".insteadof" -- git remotes can be written scp style -- [user@]host:dir scpstyle v = ":" `isInfixOf` v && not ("//" `isInfixOf` v) scptourl v = "ssh://" ++ host ++ slash dir diff --git a/debian/changelog b/debian/changelog index aa52730bc..c145b14f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ git-annex (3.20111112) UNRELEASED; urgency=low * status: Fix --json mode (only the repository lists are currently displayed) * status: --fast is back + * Fix support for insteadOf url remapping. Closes: #644278 -- Joey Hess <joeyh@debian.org> Sat, 12 Nov 2011 14:50:21 -0400 |