summaryrefslogtreecommitdiff
path: root/CmdLine.hs
Commit message (Collapse)AuthorAge
* Make --json and --quiet suppress automatic init messagesGravatar Joey 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 importsGravatar Joey Hess2016-01-20
|
* make noMessages disable closing of json object in --json modeGravatar Joey 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 enabledGravatar Joey 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 outputGravatar Joey Hess2015-11-04
| | | | still no progress displays when getting files etc, but a big improvement
* concurrent-output, first passGravatar Joey 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 ↵Gravatar Joey Hess2015-09-09
| | | | displayed for commands that require a git repo, etc.
* Improve shutdown due to --time-limit, especially for fsckGravatar Joey 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 optionsGravatar Joey Hess2015-07-10
|
* implement withGlobalOptions, and convert FindGravatar Joey Hess2015-07-10
|
* improve global options display in --helpGravatar Joey 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 optionsGravatar Joey 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)Gravatar Joey Hess2015-07-10
|
* let optparse-applicative handle the usage display when run w/o command or ↵Gravatar 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 improvementsGravatar Joey Hess2015-07-09
|
* improve autocorrection code so that --bash-completion-script etc will workGravatar Joey 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 commandsGravatar Joey Hess2015-07-08
|
* converted fsck's options to optparse-applicativeGravatar Joey Hess2015-07-08
| | | | Global options and seeking and key options are still to be done.
* support cmdnorepo actions, also using getopt-applicative thereGravatar Joey Hess2015-07-08
|
* 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
|
* Run shutdown cleanup actions even if there were failures processing the command.Gravatar Joey Hess2014-12-30
| | | | | Amoung other fixes, this means that addurl will stage added files even if adding one of the urls fails.
* hlintGravatar Joey Hess2014-10-09
|
* fix some mixed space+tab indentationGravatar Joey 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.Gravatar 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: #758592Gravatar Joey 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 cachingGravatar Joey 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 ↵Gravatar Joey Hess2014-01-29
| | | | process library
* 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.
* make "git annex help options" work outside a git repoGravatar Joey 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__ definesGravatar Joey Hess2013-08-04
|
* find: Avoid polluting stdout with progress messages. Closes: #718186Gravatar Joey Hess2013-07-30
|
* annex.debug can now be set to enable debug logging by default. The webapp's ↵Gravatar Joey Hess2013-06-17
| | | | debugging check box does this.
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey 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 stuffGravatar Joey Hess2013-05-10
|
* Detect systems that have no user name set in GECOS, and also don't have ↵Gravatar 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 tweakGravatar Joey Hess2013-03-28
|
* Per-command usage messages.Gravatar Joey Hess2013-03-27
|
* make usage less terrifyingGravatar Joey Hess2013-03-25
| | | | Need to make `git annex help command` show the options for that command.
* where indentingGravatar Joey Hess2012-11-11
|
* better fix for zombie problem, which turns out to be a zombie ssh started by ↵Gravatar 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.Gravatar Joey Hess2012-10-16
|
* bring back default SIGINT handlerGravatar Joey 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 oneshotGravatar Joey Hess2012-09-15
|
* add fields to git-annex-shellGravatar Joey Hess2012-07-02
|
* noopGravatar Joey Hess2012-04-21
|
* always run autocorrect code on fuzzy matches, even if there is just 1Gravatar Joey Hess2012-04-14
|
* autocorrectionGravatar Joey 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.