summaryrefslogtreecommitdiff
path: root/CmdLine.hs
Commit message (Collapse)AuthorAge
* Make --json and --quiet suppress automatic init messagesJoey Hess2016-09-05
| | | | | | | | | | | | | | And any other messages that might be output before a command starts. Fixes a reversion introduced in version 5.20150727. During the optparse-applicative conversion, I needed a place to run per-command global option setters, and I made it get run during the seek stage. But that is too late to have --json and --quiet disable output produced in the check stage. Fix is just to run those per-command global option setters at the same time as the all-command global option setters. This commit was sponsored by Thom May.
* remove 163 lines of code without changing anything except importsJoey Hess2016-01-20
|
* make noMessages disable closing of json object in --json modeJoey Hess2016-01-20
| | | | | | | | | | | This allows things like Command.Find to use noMessages and generate their own complete json objects. Previouly, Command.Find managed that only via a hack, which wasn't compatable with batch mode. Only Command.Find, Command.Smudge, and Commange.Status use noMessages currently, and none except for Command.Find are impacted by this change. Fixes find --json --batch output
* arrange for regional output manager to run when -J is enabledJoey Hess2015-11-04
| | | | | | | | | | Commands that want to use it have to run their seek action inside allowConcurrentOutput. Which seems reasonable; perhaps some future command will want to support the -J flag but not use regions. The region state moved from Annex to MessageState. This makes sense organizationally, and note that some uses of onLocal use a different Annex state, but pass the MessageState into it, which is what is needed.
* add regions to concurrent outputJoey Hess2015-11-04
| | | | still no progress displays when getting files etc, but a big improvement
* concurrent-output, first passJoey Hess2015-11-04
| | | | | | Output without -Jn should be unchanged from before. With -Jn, concurrent-output is used for messages, but regions are not used yet, so it's a mess.
* Make full option parsing be done when not in a git repo, so --help can be ↵Joey Hess2015-09-09
| | | | displayed for commands that require a git repo, etc.
* Improve shutdown due to --time-limit, especially for fsckJoey Hess2015-07-31
| | | | | | | | | | | | | | | * Perform a clean shutdown when --time-limit is reached. This includes running queued git commands, and cleanup actions normally run when a command is finished. * fsck: Commit incremental fsck database when --time-limit is reached. Previously, some of the last files fscked did not make it into the database when using --time-limit. Note that this changes Annex.addCleanup hooks, to run after --time-limit expires. Fsck was using such a hook to clean up after a --incremental-schedule, and that shouldn't run when --time-limit exipires it. So, instead, moved that cleanup code to be run by cleanupIncremental. Resulted in some data type juggling.
* finished converting all the main optionsJoey Hess2015-07-10
|
* implement withGlobalOptions, and convert FindJoey Hess2015-07-10
|
* improve global options display in --helpJoey Hess2015-07-10
| | | | | | Put them in the help of subcommands, not the main command. And, hide them from the synopsis, to avoid cluttering it.
* wired up global optionsJoey Hess2015-07-10
| | | | | | | Note that I ran into a problem where parsing the global options looped forever, eating memory. It was somehow caused by stacking combineGlobalSetters inside a combineGlobalSetters. Maybe due to both using "many"? Anyway, changed things to avoid that.
* convert global options (still not used)Joey Hess2015-07-10
|
* let optparse-applicative handle the usage display when run w/o command or ↵Joey Hess2015-07-09
| | | | | | | bad command Still generating the list of commands myself, to get it sorted into sections and with short synopses.
* few more subcommand --help improvementsJoey Hess2015-07-09
|
* improve autocorrection code so that --bash-completion-script etc will workJoey Hess2015-07-08
| | | | | git-annex --bash-completion-script git-annex will now work; before the command autocorrection would screw it up
* improve --help display for commandsJoey Hess2015-07-08
|
* converted fsck's options to optparse-applicativeJoey Hess2015-07-08
| | | | Global options and seeking and key options are still to be done.
* support cmdnorepo actions, also using getopt-applicative thereJoey Hess2015-07-08
|
* started converting to use optparse-applicativeJoey 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 urlJoey Hess2015-01-21
|
* Run shutdown cleanup actions even if there were failures processing the command.Joey Hess2014-12-30
| | | | | Amoung other fixes, this means that addurl will stage added files even if adding one of the urls fails.
* hlintJoey Hess2014-10-09
|
* fix some mixed space+tab indentationJoey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* Fix handing of autocorrection when running outside a git repository.Joey Hess2014-08-23
| | | | | | Old behavior was to take the first fuzzy match. Now, it checks the globa git config, and runs the normal fuzzy handling, including failing to run a semi-random command by default.
* Make --help work when not in a git repository. Closes: #758592Joey Hess2014-08-19
| | | | | | | | | | | | Note that this means getopt parsing is done even when not in a git repository, even though currently cmdnorepo is not passed the results of it. I'd like to move to cmdnorepo not doing its own ad-hoc option parsing, so this is really a good thing. (But as long as eg, getOptionFlag needs an Annex monad, it cannot be used in cmdnorepo handling.) There is a potential for problems if any cmdnorepo branch of a command handles options that are not in its regular getopt, but that would be a bug anyway.
* only run sshCleanup when the command actually used ssh connection cachingJoey Hess2014-03-13
| | | | | Optimises query commands that do not. More importantly, avoids any ssh connection cleanup delay causing problems at the end of such commands.
* avoid using function named that conflicts with name used in newer version of ↵Joey Hess2014-01-29
| | | | process library
* fix inversion of control in CommandSeek (no behavior changes)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.
* make "git annex help options" work outside a git repoJoey Hess2013-11-30
| | | | | | Option parsing for commands that run outside git repos is still screwy, as there is no Annex monad and so the flags cannot be passed in. But, any remaining parameters can be, which is enough for this fix.
* missed some __WINDOWS__ definesJoey Hess2013-08-04
|
* find: Avoid polluting stdout with progress messages. Closes: #718186Joey Hess2013-07-30
|
* annex.debug can now be set to enable debug logging by default. The webapp's ↵Joey Hess2013-06-17
| | | | debugging check box does this.
* fix permission damage (thanks, Windows)Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Joey Hess2013-05-11
|
* fixup #if 0 stubs to use #ifndef mingw32_HOST_OSJoey Hess2013-05-10
| | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* stub out POSIX stuffJoey Hess2013-05-10
|
* Detect systems that have no user name set in GECOS, and also don't have ↵Joey Hess2013-04-22
| | | | user.name set in git config, and put in a workaround so that commits to the git-annex branch (and the assistant) will still succeed despite git not liking the system configuration.
* syntax tweakJoey Hess2013-03-28
|
* Per-command usage messages.Joey Hess2013-03-27
|
* make usage less terrifyingJoey Hess2013-03-25
| | | | Need to make `git annex help command` show the options for that command.
* where indentingJoey Hess2012-11-11
|
* better fix for zombie problem, which turns out to be a zombie ssh started by ↵Joey Hess2012-10-17
| | | | | | | | | | | | | | | | | | | | | rsync When rsyncProgress pipes rsync's stdout, this turns out to cause a ssh process started by rsync to be left behind as a zombie. I don't know why, but my recent zombie reaping cleanup was correct, it's just that this other zombie, that's not directly started by git-annex, was no longer reaped due to changes in the cleanup. Make rsyncProgress reap the zombie started by rsync, as a workaround. FWIW, the process tree looks like this. It seems like the rsync child is for some reason starting but not waiting on this extra ssh process. Ssh connection caching may be involved -- disabling it seemed to change the shape of the tree, but did not eliminate the zombie. 9378 pts/14 S+ 0:00 | \_ rsync -p --progress --inplace -4 -e 'ssh' '-S' ... 9379 pts/14 S+ 0:00 | | \_ ssh ... 9380 pts/14 S+ 0:00 | | \_ rsync -p --progress --inplace -4 -e 'ssh' '-S' ... 9381 pts/14 Z+ 0:00 | \_ [ssh] <defunct>
* Fix zombie cleanup reversion introduced in 3.20121009.Joey Hess2012-10-16
|
* bring back default SIGINT handlerJoey Hess2012-10-01
| | | | | | | | | | | | This seems to fix a problem I've recently seen where ctrl-c during rsync leads to `git annex get` moving on to the next thing rather than exiting. Seems likely that started happening with the switch to System.Process (d1da9cf221aeea5c7ac8a313a18b559791a04f12), as the old code took care to install a default SIGINT handler. Note that since the bug was only occurring sometimes, I am not 100% sure I've squashed it, although I seem to have.
* more descriptive name for oneshotJoey Hess2012-09-15
|
* add fields to git-annex-shellJoey Hess2012-07-02
|
* noopJoey Hess2012-04-21
|
* always run autocorrect code on fuzzy matches, even if there is just 1Joey Hess2012-04-14
|
* autocorrectionJoey Hess2012-04-12
| | | | | | | git-annex (but not git-annex-shell) supports the git help.autocorrect configuration setting, doing fuzzy matching using the restricted Damerau-Levenshtein edit distance, just as git does. This adds a build dependency on the haskell edit-distance library.