refactor
This commit is contained in:
parent
633021e135
commit
ca1a3caaa8
1 changed files with 4 additions and 4 deletions
|
@ -102,12 +102,14 @@ seek o@(LocalImportOptions {}) = allowConcurrentOutput $ do
|
||||||
largematcher <- largeFilesMatcher
|
largematcher <- largeFilesMatcher
|
||||||
(commandAction . startLocal largematcher (duplicateMode o))
|
(commandAction . startLocal largematcher (duplicateMode o))
|
||||||
`withPathContents` importFiles o
|
`withPathContents` importFiles o
|
||||||
seek o@(RemoteImportOptions {}) = do
|
seek o@(RemoteImportOptions {}) = allowConcurrentOutput $ do
|
||||||
r <- getParsed (importFromRemote o)
|
r <- getParsed (importFromRemote o)
|
||||||
subdir <- maybe
|
subdir <- maybe
|
||||||
(pure Nothing)
|
(pure Nothing)
|
||||||
(Just <$$> inRepo . toTopFilePath)
|
(Just <$$> inRepo . toTopFilePath)
|
||||||
(importToSubDir o)
|
(importToSubDir o)
|
||||||
|
unlessM (Remote.isImportSupported remote) $
|
||||||
|
giveup "That remote does not support imports."
|
||||||
seekRemote r (importToBranch o) subdir
|
seekRemote r (importToBranch o) subdir
|
||||||
|
|
||||||
startLocal :: GetFileMatcher -> DuplicateMode -> (FilePath, FilePath) -> CommandStart
|
startLocal :: GetFileMatcher -> DuplicateMode -> (FilePath, FilePath) -> CommandStart
|
||||||
|
@ -245,9 +247,7 @@ verifyExisting key destfile (yes, no) = do
|
||||||
(const yes) no
|
(const yes) no
|
||||||
|
|
||||||
seekRemote :: Remote -> Branch -> Maybe TopFilePath -> CommandSeek
|
seekRemote :: Remote -> Branch -> Maybe TopFilePath -> CommandSeek
|
||||||
seekRemote remote branch msubdir = allowConcurrentOutput $ do
|
seekRemote remote branch msubdir = do
|
||||||
unlessM (Remote.isImportSupported remote) $
|
|
||||||
giveup "That remote does not support imports."
|
|
||||||
importtreeconfig <- case msubdir of
|
importtreeconfig <- case msubdir of
|
||||||
Nothing -> return ImportTree
|
Nothing -> return ImportTree
|
||||||
Just subdir ->
|
Just subdir ->
|
||||||
|
|
Loading…
Reference in a new issue