From 984c9fc0523bcd3bfcd7de83f4f7974daa6872bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Sep 2011 13:30:04 -0400 Subject: remove optimize subcommand; use --auto instead get, drop: Added --auto option, which decides whether to get/drop content as needed to work toward the configured numcopies. The problem with bundling it up in optimize was that I then found I wanted to run an optmize that did not drop files, only got them. Considered adding a --only-get switch to it, but that seemed wrong. Instead, let's make existing subcommands optionally smarter. Note that the only actual difference between drop and drop --auto is that the latter does not even try to drop a file if it knows of not enough copies, and does not print any error messages about files it was unable to drop. It might be nice to make get avoid asking git for attributes when not in auto mode. For now it always asks for attributes. --- Annex.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Annex.hs') diff --git a/Annex.hs b/Annex.hs index f5c3e4de4..2c8ea1d61 100644 --- a/Annex.hs +++ b/Annex.hs @@ -52,6 +52,7 @@ data AnnexState = AnnexState , output :: OutputType , force :: Bool , fast :: Bool + , auto :: Bool , branchstate :: BranchState , forcebackend :: Maybe String , forcenumcopies :: Maybe Int @@ -75,6 +76,7 @@ newState gitrepo = AnnexState , output = NormalOutput , force = False , fast = False + , auto = False , branchstate = startBranchState , forcebackend = Nothing , forcenumcopies = Nothing -- cgit v1.2.3