more windows path fixes

normalize filepaths in the map because it may be constructed with
windows-style paths and then queried for git-style
This commit is contained in:
Joey Hess 2016-05-04 12:57:07 -04:00
parent 066f5bcdcb
commit a9e8cf42d6
Failed to extract signature

View file

@ -481,12 +481,13 @@ reverseAdjustedTree basis adj csha = do
where where
reverseadj = reverseAdjustment adj reverseadj = reverseAdjustment adj
propchanges changes ti@(TreeItem f _ _) = propchanges changes ti@(TreeItem f _ _) =
case M.lookup f m of case M.lookup (norm f) m of
Nothing -> return (Just ti) -- not changed Nothing -> return (Just ti) -- not changed
Just change -> adjustTreeItem reverseadj change Just change -> adjustTreeItem reverseadj change
where where
m = M.fromList $ map (\i@(TreeItem f' _ _) -> (f', i)) $ m = M.fromList $ map (\i@(TreeItem f' _ _) -> (norm f', i)) $
map diffTreeToTreeItem changes map diffTreeToTreeItem changes
norm = normalise . getTopFilePath
diffTreeToTreeItem :: Git.DiffTree.DiffTreeItem -> TreeItem diffTreeToTreeItem :: Git.DiffTree.DiffTreeItem -> TreeItem
diffTreeToTreeItem dti = TreeItem diffTreeToTreeItem dti = TreeItem