This commit is contained in:
Joey Hess 2019-03-09 13:34:57 -04:00
parent 633021e135
commit ca1a3caaa8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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 ->