diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-02 15:12:33 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-02 15:12:33 -0400 |
commit | b38a482dd99a4f16c9752190e929b7726aba4c83 (patch) | |
tree | 5ea3ff8397d4207ce9db5cf5a963957acf747d07 /Command/Add.hs | |
parent | 8e7728b312704f6f4cb84d81302c1518f0e85948 (diff) |
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.
Diffstat (limited to 'Command/Add.hs')
-rw-r--r-- | Command/Add.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index 4ae97b6e3..27c11eab4 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -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 |