avoid double RawFilePath conversion
Minor optimisation.
This commit is contained in:
parent
d9fd205cbb
commit
b0302c937d
1 changed files with 3 additions and 4 deletions
|
@ -164,9 +164,8 @@ batchFilesKeys fmt a = do
|
||||||
matcher <- getMatcher
|
matcher <- getMatcher
|
||||||
go $ \si v -> case v of
|
go $ \si v -> case v of
|
||||||
Right f ->
|
Right f ->
|
||||||
let f' = toRawFilePath f
|
ifM (matcher $ MatchingFile $ FileInfo f f Nothing)
|
||||||
in ifM (matcher $ MatchingFile $ FileInfo f' f' Nothing)
|
( a (si, Right f)
|
||||||
( a (si, Right f')
|
|
||||||
, return Nothing
|
, return Nothing
|
||||||
)
|
)
|
||||||
Left k -> a (si, Left k)
|
Left k -> a (si, Left k)
|
||||||
|
@ -177,7 +176,7 @@ batchFilesKeys fmt a = do
|
||||||
-- because in non-batch mode, that is done when
|
-- because in non-batch mode, that is done when
|
||||||
-- CmdLine.Seek uses git ls-files.
|
-- CmdLine.Seek uses git ls-files.
|
||||||
BatchFormat _ (BatchKeys False) ->
|
BatchFormat _ (BatchKeys False) ->
|
||||||
Right . Right . fromRawFilePath
|
Right . Right
|
||||||
<$$> liftIO . relPathCwdToFile . toRawFilePath
|
<$$> liftIO . relPathCwdToFile . toRawFilePath
|
||||||
BatchFormat _ (BatchKeys True) -> \i ->
|
BatchFormat _ (BatchKeys True) -> \i ->
|
||||||
pure $ case deserializeKey i of
|
pure $ case deserializeKey i of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue