addurl, importfeed: Changed to honor annex.largefiles settings, when the content of the url is downloaded. (Not when using --fast or --relaxed.)
importfeed just calls addurl functions, so inherits this from it. Note that addurl still generates a temp file, and uses that key to download the file. It just adds it to the work tree at the end when the file is small.
This commit is contained in:
parent
dc8099872a
commit
f16e235983
6 changed files with 41 additions and 21 deletions
|
@ -73,18 +73,18 @@ seek o = allowConcurrentOutput $ do
|
|||
startSmall :: FilePath -> CommandStart
|
||||
startSmall file = do
|
||||
showStart "add" file
|
||||
next $ performSmall file
|
||||
next $ next $ addSmall file
|
||||
|
||||
performSmall :: FilePath -> CommandPerform
|
||||
performSmall file = do
|
||||
addSmall :: FilePath -> Annex Bool
|
||||
addSmall file = do
|
||||
showNote "non-large file; adding content to git repository"
|
||||
performAdd file
|
||||
addFile file
|
||||
|
||||
performAdd :: FilePath -> CommandPerform
|
||||
performAdd file = do
|
||||
addFile :: FilePath -> Annex Bool
|
||||
addFile file = do
|
||||
ps <- forceParams
|
||||
Annex.Queue.addCommand "add" (ps++[Param "--"]) [file]
|
||||
next $ return True
|
||||
return True
|
||||
|
||||
{- The add subcommand annexes a file, generating a key for it using a
|
||||
- backend, and then moving it into the annex directory and setting up
|
||||
|
@ -101,7 +101,7 @@ start file = ifAnnexed file addpresent add
|
|||
| otherwise -> do
|
||||
showStart "add" file
|
||||
next $ if isSymbolicLink s
|
||||
then performAdd file
|
||||
then next $ addFile file
|
||||
else perform file
|
||||
addpresent key = ifM isDirect
|
||||
( do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue