summaryrefslogtreecommitdiff
path: root/Command/DropUnused.hs
Commit message (Collapse)AuthorAge
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* doh't use "def" for command definitions, it conflicts with Data.Default.defGravatar Joey Hess2014-10-14
|
* Added required content configuration.Gravatar Joey Hess2014-03-29
| | | | | | | This includes checking when dropping files that any required content configuration is satisfied. However, it does not yet include an active check on the required content; the location log is trusted when checking the required content expression.
* notifications on dropGravatar Joey Hess2014-03-22
|
* Put non-object tmp files in .git/annex/misctmp, leaving .git/annex/tmp for ↵Gravatar Joey Hess2014-02-26
| | | | | | | | | | | | | | | | | | | | only partially transferred objects. This allows eg, putting .git/annex/tmp on a ram disk, if the disk IO of temp object files is too annoying (and if you don't want to keep partially transferred objects across reboots). .git/annex/misctmp must be on the same filesystem as the git work tree, since files are moved to there in a way that will not work cross-device, as well as symlinked into there. I first wanted to put the tmp objects in .git/annex/objects/tmp, but that would pose transition problems on upgrade when partially transferred objects existed. git annex info does not currently show the size of .git/annex/misctemp, since it should stay small. It would also be ok to make something clean it out, periodically.
* reorganize some files and importsGravatar Joey Hess2014-01-26
|
* reorgGravatar Joey Hess2014-01-21
|
* numcopies cleanup, part 2Gravatar Joey Hess2014-01-21
| | | | This includes several bug fixes.
* fix inversion of control in CommandSeek (no behavior changes)Gravatar Joey Hess2014-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've been disliking how the command seek actions were written for some time, with their inversion of control and ugly workarounds. The last straw to fix it was sync --content, which didn't fit the Annex [CommandStart] interface well at all. I have not yet made it take advantage of the changed interface though. The crucial change, and probably why I didn't do it this way from the beginning, is to make each CommandStart action be run with exceptions caught, and if it fails, increment a failure counter in annex state. So I finally remove the very first code I wrote for git-annex, which was before I had exception handling in the Annex monad, and so ran outside that monad, passing state explicitly as it ran each CommandStart action. This was a real slog from 1 to 5 am. Test suite passes. Memory usage is lower than before, sometimes by a couple of megabytes, and remains constant, even when running in a large repo, and even when repeatedly failing and incrementing the error counter. So no accidental laziness space leaks. Wall clock speed is identical, even in large repos. This commit was sponsored by an anonymous bitcoiner.
* dropunused behavior change: Now refuses to drop the last copy of a file, ↵Gravatar Joey Hess2013-07-25
| | | | | | | | | | unless you use the --force. This was the last place in git-annex that could remove data referred to by the git history, without being forced. Like drop, dropunused checks remotes, and honors the global annex.numcopies setting. (However, .gitattributes settings cannot apply to unused files.)
* --unused: New switch that makes git-annex operate on all data found by the ↵Gravatar Joey Hess2013-07-03
| | | | last run of git annex unused. Supported by fsck, get, move, copy.
* add section metadata to all commandsGravatar Joey Hess2013-03-24
| | | | Not yet used .. mindless train work.
* two types of byNameGravatar Joey Hess2013-03-05
| | | | | | | | Clean up from 5123a1a83aa3b954fe67629508bab5ccea0e4148. In some cases, looking up a remote by name even though it has no UUID is desirable. This includes git annex sync, which can operate on remotes without an annex, and XMPP pairing, which runs addRemote (with calls byName) before the UUID of the XMPP remote has been configured in git.
* webapp and assistant glacier supportGravatar Joey Hess2012-11-24
|
* where indentationGravatar Joey Hess2012-11-12
|
* factor out nukeFileGravatar Joey Hess2012-06-06
|
* addunused: New command, the opposite of dropunused, it relinks unused ↵Gravatar Joey Hess2012-05-02
| | | | content into the git repository.
* dropunused: Allow specifying ranges to drop.Gravatar Joey Hess2012-05-02
| | | | | Sort of by popular demand, but the last straw for not using seq was that it can run into command line length limits.
* tweakGravatar Joey Hess2012-01-06
|
* look up --to and --from remote names only onceGravatar Joey Hess2012-01-06
| | | | This will speed up commands like move and drop.
* more command-specific optionsGravatar Joey Hess2012-01-06
| | | | | | | | | | | | | | | | | | | | | Made --from and --to command-specific options. Added generic storage for values of command-specific options, which allows removing some of the special case fields in AnnexState. (Also added generic storage for command-specific flags, although there are not yet any.) Note that this storage uses a Map, so repeatedly looking up the same value is slightly more expensive than looking up an AnnexState field. But, the value can be looked up once in the seek stage, transformed as necessary, and passed in a closure to the start stage, and this avoids that overhead. Still, I'm hesitant to use this for things like force or fast flags. It's probably best to reserve it for flags that are only used by a few commands, or options like --from and --to that it's important only be allowed to be used with commands that implement them, to avoid user confusion.
* some work on avoiding partial functionsGravatar Joey Hess2011-12-09
| | | | | There are still hundreds of places that use partial functions head, tail, init, and last.
* Bugfix: dropunused did not drop keys with two spaces in their name.Gravatar Joey Hess2011-11-27
|
* reorg to allow taking content lockGravatar Joey Hess2011-11-09
| | | | | | | The lock will only persist during the perform stage, so the content must be removed from the annex then, rather than in the cleanup stage. (No lock is actually taken yet.)
* reorder repo parameters lastGravatar Joey Hess2011-11-08
| | | | | | | | | | | | | Many functions took the repo as their first parameter. Changing it consistently to be the last parameter allows doing some useful things with currying, that reduce boilerplate. In particular, g <- gitRepo is almost never needed now, instead use inRepo to run an IO action in the repo, and fromRepo to get a value from the repo. This also provides more opportunities to use monadic and applicative combinators.
* cleanupGravatar Joey Hess2011-10-31
|
* unused, dropunused: Now work in bare repositories.Gravatar Joey Hess2011-10-29
| | | | | Turned out I had already done all the work needed to support this when unused started checking all branches.
* clean up check selection codeGravatar Joey Hess2011-10-29
| | | | | | | | | This new approach allows filtering out checks from the default set that are not appropriate for a command, rather than having to list every check that is appropriate. It also reduces some boilerplate. Haskell does not define Eq for functions, so I had to go a long way around with each check having a unique id. Meh.
* drop --from is now supported to remove file content from a remote.Gravatar Joey Hess2011-10-28
|
* Fail if --from or --to is passed to commands that do not support them.Gravatar Joey Hess2011-10-27
|
* refactored and generalized pre-command sanity checkingGravatar Joey Hess2011-10-27
|
* renameGravatar Joey Hess2011-10-05
|
* renameGravatar Joey Hess2011-10-04
|
* factor out common importsGravatar Joey Hess2011-10-03
| | | | no code changes
* remove command type definitionsGravatar Joey Hess2011-09-15
| | | | | | | These were a mistake, they make the type signatures harder to read and less flexible. The CommandSeek, CommandStart, CommandPerform, and CommandCleanup types were a good idea, but composing them with the parameters expected is going too far.
* split groups of related functions out of UtilityGravatar Joey Hess2011-08-22
|
* unify elipsis handlingGravatar Joey Hess2011-07-19
| | | | | And add a simple dots-based progress display, currently only used in v2 upgrade.
* finished hlint passGravatar Joey Hess2011-07-15
|
* remove unused backend machineryGravatar Joey Hess2011-07-05
| | | | | | | | | | | | | The only remaining vestiage of backends is different types of keys. These are still called "backends", mostly to avoid needing to change user interface and configuration. But everything to do with storing keys in different backends was gone; instead different types of remotes are used. In the refactoring, lots of code was moved out of odd corners like Backend.File, to closer to where it's used, like Command.Drop and Command.Fsck. Quite a lot of dead code was removed. Several data structures became simpler, which may result in better runtime efficiency. There should be no user-visible changes.
* renamed GitRepo to GitGravatar Joey Hess2011-06-30
| | | | It was always imported qualified as Git anyway
* rename modules for data types into Types/ directoryGravatar Joey Hess2011-06-01
|
* add whenM and unlessMGravatar Joey Hess2011-05-17
| | | | | Just more golfing.. I am pretty sure something in a library somewhere can do this, but I have been unable to find it.
* simplified a bunch of Maybe handlingGravatar Joey Hess2011-05-15
|
* refactor some boilerplateGravatar Joey Hess2011-05-15
|
* unused: Now also lists files fsck places in .git/annex/bad/Gravatar Joey Hess2011-04-29
|
* unused/dropunused: support --fromGravatar Joey Hess2011-04-02
|
* dropunused: Significantly sped up; only read unused log file once.Gravatar Joey Hess2011-03-23
|
* avoid version check before running version and upgrade commandsGravatar Joey Hess2011-03-19
| | | | | There are two types of commands; those that access the repository and those that don't. Sorted.
* first pass at using new keysGravatar Joey Hess2011-03-15
| | | | | | | It compiles. It sorta works. Several subcommands are FIXME marked and broken, because things that used to accept separate --backend and --key params need to be changed to accept just a --key that encodes all the key info, now that there is metadata in keys.
* fix up commands that are trouble on bare reposGravatar Joey Hess2011-03-03
| | | | | Most will just abort. init does a basic init and gives a command to run elsewhere to finish it.