aboutsummaryrefslogtreecommitdiff
path: root/Command/DropKey.hs
Commit message (Collapse)AuthorAge
* add --json-error-messages (not yet implemented)Gravatar Joey Hess2018-02-19
| | | | | | | | | | Added --json-error-messages option, which includes error messages in the json output, rather than outputting them to stderr. The actual rediretion of errors is not implemented yet, this is only the docs and option plumbing. This commit was supported by the NSF-funded DataLad project.
* showStart variant for when there's no worktree fileGravatar Joey Hess2017-11-28
| | | | | | | | | | | | Clean up some uses of showStart with "" for the file, or in some cases, a non-filename description string. That would generate bad json, although none of the commands doing that supported --json. Using "" for the file resulted in output like "foo rest"; now the extra space is eliminated. This commit was sponsored by Fernando Jimenez on Patreon.
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* --branch, stage 2Gravatar Joey Hess2016-07-20
| | | | | | | | Show branch:file that is being operated on. I had to make ActionItem a type and not a type class because withKeyOptions' passed two different types of values when using the type class, and I could not get the type checker to accept that.
* more generic showStart'Gravatar Joey Hess2016-07-20
|
* dropkey --jsonGravatar Joey Hess2016-03-06
|
* dropkey: Add --batch.Gravatar Joey Hess2016-03-06
|
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* fix local dropping to not require extra locking of copies, but only that the ↵Gravatar Joey Hess2015-10-09
| | | | local copy be locked for removal
* add lockContentSharedGravatar Joey Hess2015-10-08
| | | | | | | | Also, rename lockContent to lockContentExclusive inAnnexSafe should perhaps be eliminated, and instead use `lockContentShared inAnnex`. However, I'm waiting on that, as there are only 2 call sites for inAnnexSafe and it's fiddly.
* convert all commands to work with optparse-applicativeGravatar Joey Hess2015-07-08
| | | | Still no options though.
* started converting to use optparse-applicativeGravatar Joey Hess2015-07-08
| | | | | | | | | | | | This is a work in progress. It compiles and is able to do basic command dispatch, including git autocorrection, while using optparse-applicative for the core commandline parsing. * Many commands are temporarily disabled before conversion. * Options are not wired in yet. * cmdnorepo actions don't work yet. Also, removed the [Command] list, which was only used in one place.
* 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
|
* use types to enforce that removeAnnex can only be called inside lockContentGravatar Joey Hess2014-08-20
| | | | | | | | | | | This fixed one bug where it needed to be and wasn't (in Assistant.Unused). And also found one place where lockContent was used unnecessarily (by drop --from remote). A few other places like uninit probably don't really need to lockContent, but it doesn't hurt to do call it anyway. This commit was sponsored by David Wagner.
* refactorGravatar Joey Hess2014-01-26
|
* 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.
* add section metadata to all commandsGravatar Joey Hess2013-03-24
| | | | Not yet used .. mindless train work.
* more descriptive name for oneshotGravatar Joey Hess2012-09-15
|
* add routes to pause/start/cancel transfersGravatar Joey Hess2012-08-08
| | | | | | | | | | | | | | | | This commit includes a paydown on technical debt incurred two years ago, when I didn't know that it was bad to make custom Read and Show instances for types. As the routes need Read and Show for Transfer, which includes a Key, and deriving my own Read instance of key was not practical, I had to finally clean that up. So the compact Key read and show functions are now file2key and key2file, and Read and Show are now derived instances. Changed all code that used the old instances, compiler checked. (There were a few places, particularly in Command.Unused, and the test suite where the Show instance continue to be used for legitimate comparisons; ie show key_x == show key_y (though really in a bloom filter))
* set oneshot mode on a per-command basisGravatar Joey Hess2012-02-14
| | | | Avoids ugly (and test suite failing) hack in Command.Version
* inverted logicGravatar Joey Hess2011-12-09
|
* factor out a stopUnlessGravatar Joey Hess2011-12-09
| | | | code melt for lunch
* lockContent in dropkeyGravatar Joey Hess2011-11-09
| | | | | This is needed for drop --from and move --from to check the lock, as they do not use git-annex-shell inannex.
* cleanupGravatar Joey Hess2011-10-31
|
* 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.
* 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
|
* reorganize log modulesGravatar Joey Hess2011-10-15
| | | | no code changes
* 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.
* add web special remoteGravatar Joey Hess2011-07-01
| | | | | Generalized LocationLog to PresenceLog, and use a presence log to record urls for the web special remote.
* refactor some boilerplateGravatar Joey Hess2011-05-15
|
* 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.
* make commands that take a key as a parameter error if it's badGravatar Joey Hess2011-03-15
|
* fixed dropkey, setkey, and git-annex-shell subcommandsGravatar Joey Hess2011-03-15
| | | | key is now specified as the full key, no --backend needed
* 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.
* rework config storageGravatar Joey Hess2011-01-26
| | | | | | | Moved away from a map of flags to storing config directly in the AnnexState structure. Got rid of most accessor functions in Annex. This allowed supporting multiple --exclude flags.
* got rid of Core moduleGravatar Joey Hess2011-01-16
| | | | Most of it was to do with managing annexed Content, so put there
* refactor in preparation for adding a git-annex-shell commandGravatar Joey Hess2010-12-30
|
* rename some stuff and prepare to break out more into Command/*Gravatar Joey Hess2010-12-30
|
* finished hlintingGravatar Joey Hess2010-11-22
|
* refactor param seekingGravatar Joey Hess2010-11-11
|
* Annexed file contents are now made unwritable and put in unwriteable ↵Gravatar Joey Hess2010-11-08
| | | | directories, to avoid them accidentially being removed or modified. (Thanks Josh Triplett for the idea.)
* refactoring, no code changes reallyGravatar Joey Hess2010-11-08
|
* broke subcommands out into separate modulesGravatar Joey Hess2010-11-02