aboutsummaryrefslogtreecommitdiff
path: root/CmdLine
Commit message (Collapse)AuthorAge
* implemented git-annex-shell p2pstdioGravatar Joey Hess2018-03-07
| | | | | | | | | | | Not yet used by git-annex, but this will allow faster transfers etc than using individual ssh connections and rsync. Not called git-annex-shell p2p, because git-annex p2p does something else and I don't want two subcommands with the same name between the two for sanity reasons. This commit was sponsored by Øyvind Andersen Holm.
* 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.
* fix --json-progress --json to be same as --json --json-progressGravatar Joey Hess2018-02-19
| | | | | | | Fix behavior of --json-progress followed by --json, in which the latter option disabled the former. This commit was supported by the NSF-funded DataLad project.
* Improve startup time for commands that do not operate on remotesGravatar Joey Hess2018-01-09
| | | | | | | | | | | | | | And for tab completion, by not unnessessarily statting paths to remotes, which used to cause eg, spin-up of removable drives. Got rid of the remotes member of Git.Repo. This was a bit painful. Remote.Git modifies the list of remotes as it reads their configs, so still need a persistent list of remotes. So, put it in as Annex.gitremotes. It's only populated by getGitRemotes, so commands like examinekey that don't care about remotes won't do so. This commit was sponsored by Jake Vosloo on Patreon.
* Fix bug introduced in version 6.20171018 that caused some commands to print ↵Gravatar Joey Hess2017-12-28
| | | | | | out "ok" twice after processing a file. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon
* Added inprogress command for accessing files as they are being downloaded.Gravatar Joey Hess2017-12-28
| | | | | | | | Chose to make this only handle files actively being downloaded, not temp files for downloads that were interrupted or files that have been fully downloaded. This commit was sponsored by Ole-Morten Duesund on Patreon.
* Removed the testsuite build flagGravatar Joey Hess2017-12-20
| | | | | | | | | | Test suite is always included. Building with this flag disabled has actually been broken for some time, since Command.TestRemote uses tasty. Fewer build flags are better, so good time to drop it. This commit was sponsored by Thomas Hochstein on Patreon.
* more lambda-case conversionGravatar Joey Hess2017-12-05
|
* better dup key with -J fixGravatar Joey Hess2017-10-17
| | | | | | | | | | | | | | | This avoids all the complication about redundant work discussed in the previous try at fixing this. At the expense of needing each command that could have the problem to be patched to simply wrap the action in onlyActionOn once the key is known. But there do not seem to be many such commands. onlyActionOn' should not be used with a CommandStart (or CommandPerform), although the types do allow it. onlyActionOn handles running the whole CommandStart chain. I couldn't immediately see a way to avoid mistken use of onlyActionOn'. This commit was supported by the NSF-funded DataLad project.
* Avoid repeated checking that files passed on the command line exist.Gravatar Joey Hess2017-10-16
| | | | | | | | | | | git annex add, git annex lock etc make multiple seek passes, and each seek pass checked that files existed. That was unncessary redundant work. Fixed by adding a new WorkTreeItem type, make seek actions use it, and check that the files exist when constructing it. This commit was supported by the NSF-funded DataLad project.
* improve typeGravatar Joey Hess2017-08-31
|
* initial export commandGravatar Joey Hess2017-08-29
| | | | | | Very basic operation works, but of course this is only the beginning. This commit was sponsored by Nick Daly on Patreon.
* zsh and fish completionsGravatar Joey Hess2017-06-09
| | | | | | | | | | | | | | | | optparse-applicative-0.14.0.0 adds support for these, so have the Makefile install their scripts when built with it. CmdLine/GitAnnex/Options.hs now uses action "file" in cmdParams, which affects the bash and zsh completions, letting them complete filenames for subcommands that use that. This is not needed for bash, since bash-completion.bash enables -o bashdefault, which lets it complete filenames too. But it does not seem to break the bash completions. It is needed for zsh; the zsh completion otherwise does not complete filenames. The fish completion will always complete filenames no matter what. Messy. This commit was sponsored by Denis Dzyubenko on Patreon.
* error when metadata set is used with file that does not existGravatar Joey Hess2017-06-01
| | | | | | | | | | | When setting metadata of a file that did not exist, no error message was displayed, unlike getting metadata and most other git-annex commands. Fixed this oversight. Note that, if the file exists but is not annexed, there's no error. This is the same behavior as other git-annex commands. This commit was supported by the NSF-funded DataLad project.
* support parsing options like --to=hereGravatar Joey Hess2017-05-31
| | | | | | | | Reworked remote name parsing to allow things like that. Command.Move uses it for --to=here, although there's not yet an implementation of that option. This commit was sponsored by Ignacio on Patreon.
* Avoid concurrent git-config setting problem when running concurrent threads.Gravatar Joey Hess2017-05-25
| | | | | | | | | | See my comment. This only avoids the problem for -J; two git-annex processes started at the same time could still both try to write to .git/config and one fail. That would be very unlikely though, and it doesn't really seem worth adding an additional layer of locking around .git/config. This commit was supported by the NSF-funded DataLad project.
* multicast: New command, uses uftp to multicast annexed files, for eg a ↵Gravatar Joey Hess2017-03-30
| | | | | | classroom setting. This commit was supported by the NSF-funded DataLad project.
* git-annex-shell: run all commands with noMessagesGravatar Joey Hess2017-03-17
| | | | | | | | | | | | | | | | | | | | Fix bug when used with a recently cloned repository, where "merging" messages were included in the output of configlist (and perhaps other commands) and caused a "Failed to get annex.uuid configuration" error. This does not seem to have been a reversion. I saw this with configlist, but it seems possible for other commands to be effected, and it might not always happen only after a fresh clone. Eg, if a foo/git-annex branch is pushed to the remote, the next git-annex-shell will auto-merge it and display the message. Decided to run all git-annex-shell commands with noMessages, even ones that don't currently use stdout for structured communication. Better to keep open the possibility for using stdout in the future. This commit was supported by the NSF-funded DataLad project
* Bugfix: Passing a command a filename that does not exist sometimes did not ↵Gravatar Joey Hess2017-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | display an error, when a path to a directory was also passed. It was relying on segmentPaths to work correctly, so when it didn't, sometimes the file that did not exist got matched up with a non-null list of results. Fixed by always checking if each parameter exists. There are two reason segmentPaths might not work correctly. For one, it assumes that when the original list of paths has more than 100 paths, it's not worth paying the CPU cost to preserve input orders. And then, it fails when a directory such as "." or ".." or /path/to/repo is in the input list, and the list of found paths does not start with that same thing. It should probably not be using dirContains, but something else. But, it's not clear how to handle this fully. Consider when [".", "subdir"] has been expanded by git ls-files to ["subdir/1", "subdir/2"] -- Both of the inputs contained those results, so there's no one right answer for segmentPaths. All these would be equally valid: [["subdir/1", "subdir/2"], []] [[], ["subdir/1", "subdir/2"]] [["subdir/1"], [""subdir/2"]] So I've not tried to improve segmentPaths.
* securehash matchingGravatar Joey Hess2017-02-27
| | | | | | | Added --securehash option to match files using a secure hash function, and corresponding securehash preferred content expression. This commit was sponsored by Ethan Aubin.
* mapM_ = sequence_ . mapGravatar Joey Hess2017-02-27
|
* add KeyVariety typeGravatar Joey Hess2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where before the "name" of a key and a backend was a string, this makes it a concrete data type. This is groundwork for allowing some varieties of keys to be disabled in file2key, so git-annex won't use them at all. Benchmarks ran in my big repo: old git-annex info: real 0m3.338s user 0m3.124s sys 0m0.244s new git-annex info: real 0m3.216s user 0m3.024s sys 0m0.220s new git-annex find: real 0m7.138s user 0m6.924s sys 0m0.252s old git-annex find: real 0m7.433s user 0m7.240s sys 0m0.232s Surprising result; I'd have expected it to be slower since it now parses all the key varieties. But, the parser is very simple and perhaps sharing KeyVarieties uses less memory or something like that. This commit was supported by the NSF-funded DataLad project.
* post-recive hook to make updateInstead work in direct mode and adjusted branchesGravatar Joey Hess2017-02-17
| | | | | | | | * Added post-recieve hook, which makes updateInstead work with direct mode and adjusted branches. * init: Set up the post-receive hook. This commit was sponsored by Fernando Jimenez on Patreon.
* config: New command for storing configuration in the git-annex branch.Gravatar Joey Hess2017-01-30
| | | | | | | | | | | Any config names can be set using this; git-annex commands will only look at specific ones that make sense and are worth the overhead of querying the branch. This might also be useful for storing whatever other config-type stuff the user might want to shove into the git-annex branch. This commit was sponsored by Jochen Bartl on Patreon.
* Remove -j short option for --json-progress; that option was already taken ↵Gravatar Joey Hess2017-01-30
| | | | | | for --json. This commit was sponsored by Trenton Cronholm.
* Merge branch 'master' into no-xmppGravatar Joey Hess2016-12-24
|\
| * Always use filesystem encoding for all file and handle reads and writes.Gravatar Joey Hess2016-12-24
| | | | | | | | | | This is a big scary change. I have convinced myself it should be safe. I hope!
| * Make all --batch input, as well as fromkey and registerurl stdin be ↵Gravatar Joey Hess2016-12-13
| | | | | | | | processed without requiring it to be in the current encoding.
| * convert P2P runners from Maybe to Either StringGravatar Joey Hess2016-12-08
| | | | | | | | | | | | So we get some useful error messages when things fail. This commit was sponsored by Peter Hogg on Patreon.
| * refactorGravatar Joey Hess2016-12-06
| |
| * cleanupsGravatar Joey Hess2016-12-01
| |
| * actually check p2p authtokens for tor connectionsGravatar Joey Hess2016-11-30
| | | | | | | | This commit was sponsored by Ethan Aubin.
| * use P2P auth for git-remote-tor-annexGravatar Joey Hess2016-11-30
| | | | | | | | | | | | | | This changes the environment variable name to the more generic GIT_ANNEX_P2P_AUTHTOKEN. This commit was sponsored by andrea rota.
| * implement p2p commandGravatar Joey Hess2016-11-30
| |
| * enable remotedaemon when assistant is not enabledGravatar Joey Hess2016-11-29
| | | | | | | | Needed to serve tor hidden services.
| * fix buildGravatar Joey Hess2016-11-24
| |
| * unified AuthToken type between webapp and torGravatar Joey Hess2016-11-22
| |
| * stop cleanly when there's a IO error accessing the HandleGravatar Joey Hess2016-11-21
| | | | | | | | | | All other exceptions are let through, but IO errors accessing the handle are to be expected, so quietly ignore.
| * pull/push over tor working nowGravatar Joey Hess2016-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Still a couple bugs: * Closing the connection to the server leaves git upload-pack / receive-pack running, which could be used to DOS. * Sometimes the data is transferred, but it fails at the end, sometimes with: git-remote-tor-annex: <socket: 10>: commitBuffer: resource vanished (Broken pipe) Must be a race condition around shutdown.
| * Added git-remote-tor-annex, which allows git pull and push to the tor hidden ↵Gravatar Joey Hess2016-11-21
| | | | | | | | | | | | | | | | | | | | | | service. Almost working, but there's a bug in the relaying. Also, made tor hidden service setup pick a random port, to make it harder to port scan. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
| * Merge branch 'master' into torGravatar Joey Hess2016-11-17
| |\
| | * 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.
* | | remove xmpp supportGravatar Joey Hess2016-11-14
| |/ |/| | | | | | | | | | | | | | | | | | | | | I've long considered the XMPP support in git-annex a wart. It's nice to remove it. (This also removes the NetMessager, which was only used for XMPP, and the daemonstatus's desynced list (likewise).) Existing XMPP remotes should be ignored by git-annex. This commit was sponsored by Brock Spratlen on Patreon.
| * git-annex enable-tor commandGravatar Joey Hess2016-11-14
|/ | | | | | | | | | | | | | | | | | Tor unfortunately does not come out of the box configured to let hidden services register themselves on the fly via the ControlPort. And, changing the config to enable the ControlPort and a particular type of auth for it may break something already using the ControlPort, or lessen the security of the system. So, this leaves only one option to us: Add a hidden service to the torrc. git-annex enable-tor does so, and picks an unused high port for tor to listen on for connections to the hidden service. It's up to the caller to somehow pick a local port to listen on that won't be used by something else. That may be difficult to do.. This commit was sponsored by Jochen Bartl on Patreon.
* addurl, get: Added --json-progress option, which adds progress objects to ↵Gravatar Joey Hess2016-09-09
| | | | | | | the json output. This doesn't work right when used with -J yet, and there is some really ugly hand-crafting of part of the json output.
* disentangle concurrency and message typeGravatar Joey Hess2016-09-09
| | | | | | | | This makes -Jn work with --json and --quiet, where before setting -Jn disabled those options. Concurrent json output is currently a mess though since threads output chunks over top of one-another.
* get, move, copy, mirror: Added --failed switch which retries failed copies/movesGravatar Joey Hess2016-08-03
| | | | | | | | | Note that get --from foo --failed will get things that a previous get --from bar tried and failed to get, etc. I considered making --failed only retry transfers from the same remote, but it was easier, and seems more useful, to not have the same remote requirement. Noisy due to some refactoring into Types/
* remove unused importGravatar Joey Hess2016-07-27
|
* fix implicit --all in bare repoGravatar Joey Hess2016-07-20
| | | | | Using the many combinator resulted in Just (WantBranchKeys []) which bypassed the defualt used for Nothing.
* --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.