summaryrefslogtreecommitdiff
path: root/Command
Commit message (Collapse)AuthorAge
...
* import: Changed how --deduplicate, --skip-duplicates, and --clean-duplicates ↵Gravatar Joey Hess2017-02-07
| | | | | | | | | | | | | | | | | | | | | determine if a file is a duplicate Before, only content known to be present somewhere was considered a duplicate. Now, any content that has been annexed before will be considered a duplicate, even if all annexed copies of the data have been lost. Note that --clean-duplicates and --deduplicate still check numcopies, so won't delete duplicate files unless there's an annexed copy. This makes import use the same method as reinject --known. The man page already said that duplicate meant "its content is either present in the local repository already, or git-annex knows of another repository that contains it, or it was present in the annex before but has been removed now". So, this is really only bringing the implementation into line with the man page. This commit was sponsored by Jochen Bartl on Patreon.
* initremote: When a uuid= parameter is passed, use the specified UUID for the ↵Gravatar Joey Hess2017-02-07
| | | | | | | new special remote, instead of generating a UUID. This can be useful in some situations, eg when the same data can be accessed via two different special remote backends.
* add SetupStage parameter to RemoteType.setupGravatar Joey Hess2017-02-07
| | | | | | | | | | | | | | | | | Most remotes have an idempotent setup that can be reused for enableremote, but in a few cases, it needs to tell which, and whether a UUID was provided to setup was used. This is groundwork for making initremote be able to provide a UUID. It should not change any behavior. Note that it would be nice to make the UUID always be provided to setup, and make setup not need to generate and return a UUID. What prevented this simplification is Remote.Git.gitSetup, which needs to reuse the UUID of the git remote when setting it up, and so has to return that UUID. This commit was sponsored by Thom May on Patreon.
* assistant: Make --autostart --foreground wait for the children it starts.Gravatar Joey Hess2017-02-07
| | | | | | Before, the --foreground was ignored when autostarting. This commit was sponsored by Denis Dzyubenko on Patreon.
* wormhole pairing appid flag day 2021-12-31Gravatar Joey Hess2017-02-03
| | | | | | | | | | | | Wormhole pairing will start to provide an appid to wormhole on 2021-12-31. An appid can't be provided now because Debian stable is going to ship a older version of git-annex that does not provide an appid. Assumption is that by 2021-12-31, this version of git-annex will be shipped in a Debian stable release. If that turns out to not be the case, this change will need to be cherry-picked into the git-annex in Debian stable, or its wormhole pairing will break. This commit was sponsored by Thomas Hochstein on Patreon.
* make sync --no-commit override annex.annex.autocommitGravatar Joey Hess2017-02-03
|
* New annex.synccontent config settingGravatar Joey Hess2017-02-03
| | | | | | | | | | | | | | | | .. which can be set to true to make git annex sync default to --content. This may become the default at some point in the future. As well as being configuable by git config, it can be configured by git-annex config to control the default behavior in all clones of a repository. Had to add a separate --no-content switch to we can tell if it's been explicitly set, and should override annex.synccontent. If --content was the default, this complication would not be necessary. This commit was sponsored by Jake Vosloo on Patreon.
* annex.autocommit can be configured via git-annex configGravatar Joey Hess2017-02-03
| | | | | | | | | | | | | | | | | ... to control the default behavior in all clones of a repository. This includes a new Configurable data type, so the GitConfig type indicates which values can be configured this way. The implementation should be quite efficient; the config log is only read once, and only when a Configurable value has not already been set by git-config. Indeed, it would be nice in the future to extend this, so that git-config is itself only read on demand. Some commands may not need to look at the git configuration at all. This commit was sponsored by Trenton Cronholm on Patreon.
* unused: When large files are checked right into git, avoid buffering their ↵Gravatar Joey Hess2017-01-31
| | | | | | | | | contents in memory. This makes it a little bit slower since it has to check file size, but worth it to fix a potential memory use problem. This commit was sponsored by Fernando Jimenez on Patreon.
* Some optimisations to string splitting code.Gravatar Joey Hess2017-01-31
| | | | | | | | | | | | | | | | | | | Turns out that Data.List.Utils.split is slow and makes a lot of allocations. Here's a much simpler single character splitter that behaves the same (even in wacky corner cases) while running in half the time and 75% the allocations. As well as being an optimisation, this helps move toward eliminating use of missingh. (Data.List.Split.splitOn is nearly as slow as Data.List.Utils.split and allocates even more.) I have not benchmarked the effect on git-annex, but would not be surprised to see some parsing of eg, large streams from git commands run twice as fast, and possibly in less memory. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* make git annex config settings editable in vicfgGravatar Joey Hess2017-01-30
| | | | This commit was sponsored by Shane-o 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.
* vicfg: Include the numcopies configuation.Gravatar Joey Hess2017-01-30
| | | | | | | | | Docs say vicfg can configure everything from git-annex branch, so it ought to configure numcopies. Note that commenting out existing numcopies does not unset it. This commit was sponsored by Thom May on Patreon.
* refactorGravatar Joey Hess2016-12-30
|
* improve description of password promptingGravatar Joey Hess2016-12-28
| | | | | | | | | Since the user does not know whether it will run su or sudo, indicate whether the password prompt will be for root or the user's password, when possible. I assume that programs like gksu that can prompt for either depending on system setup will make clear in their prompt what they're asking for.
* webapp: full wormhole pairing UI (untested)Gravatar Joey Hess2016-12-27
| | | | This commit was sponsored by Riku Voipio.
* wordingGravatar Joey Hess2016-12-24
|
* 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!
| * enable-tor: When run as a regular user, test a connection back to the hidden ↵Gravatar Joey Hess2016-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | service over tor. This way we know that after enable-tor, the tor hidden service is fully published and working, and so there should be no problems with it at pairing time. It has to start up its own temporary listener on the hidden service. It would be nice to have it start the remotedaemon running, so that extra step is not needed afterwards. But, there may already be a remotedaemon running, in communication with the assistant and we don't want to start another one. I thought about trying to HUP any running remotedaemon, but Windows does not make it easy to do that. In any case, having the user start the remotedaemon themselves lets them know it needs to be running to serve the hidden service. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
| * Revert "close"Gravatar Joey Hess2016-12-24
| | | | | | | | | | | | This reverts commit 6c089cff615bc44ca94cc4ca77dc69f281dd2ab8. Commit contained incomplete work.
| * closeGravatar Joey Hess2016-12-22
| |
| * include tor-annex in hidden service directory namesGravatar Joey Hess2016-12-21
| | | | | | | | | | | | To make it easier to manage/delete them etc. Backwards compatablity is preserved for existing tor configs.
| * fail before suing when not in a git-annex repoGravatar Joey Hess2016-12-20
| |
| * enable-tor: No longer needs to be run as root.Gravatar Joey Hess2016-12-20
| | | | | | | | | | | | When run by not root, su's to root automatically. This commit was sponsored by Brock Spratlen on Patreon.
| * relocate tor socket out of /etcGravatar Joey Hess2016-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | weasel explained that apparmor limits on what files tor can read do not apply to sockets (because they're not files). And apparently the problems I was seeing with hidden services not being accessible had to do with onion address propigation and not the location of the socket file. remotedaemon looks up the HiddenServicePort in torrc, so if it was previously configured with the socket in /etc, that will still work. This commit was sponsored by Denis Dzyubenko on Patreon.
| * rekey --force: Incorrectly marked the new key's content as being present in ↵Gravatar Joey Hess2016-12-19
| | | | | | | | the local repo even when it was not.
| * analysisGravatar Joey Hess2016-12-19
| |
| * shorten noteGravatar Joey Hess2016-12-18
| |
| * improve note displayGravatar Joey Hess2016-12-18
| |
| * typoGravatar Joey Hess2016-12-18
| |
| * check if wormhole is installedGravatar Joey Hess2016-12-18
| |
| * p2p --pair with magic wormhole (untested)Gravatar Joey Hess2016-12-18
| | | | | | | | | | | | It builds. I have not tried to run it yet. :) This commit was sponsored by Jake Vosloo on Patreon.
| * Revert "p2p --link now defaults to setting up a bi-directional link"Gravatar Joey Hess2016-12-16
| | | | | | | | | | | | | | | | This reverts commit 6aa7e136b5d246228723f4c9996bda11f66c4445. On second thought, this was an overcomplication of what should be the lowest-level primitive. Let's build bi-directional links at the pairing level with eg magic wormhole.
| * p2p: Added --one-way option.Gravatar Joey Hess2016-12-16
| | | | | | | | This commit was sponsored by Fernando Jimenez on Patreon.
| * p2p --link now defaults to setting up a bi-directional linkGravatar Joey Hess2016-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the local and remote git repositories get remotes added pointing at one-another. Makes pairing twice as easy! Security: The new LINK command in the protocol can be sent repeatedly, but only by a peer who has authenticated with us. So, it's entirely safe to add a link back to that peer, or to some other peer it knows about. Anything we receive over such a link, the peer could send us over the current connection. There is some risk of being flooded with LINKs, and adding too many remotes. To guard against that, there's a hard cap on the number of remotes that can be set up this way. This will only be a problem if setting up large p2p networks that have exceptional interconnectedness. A new, dedicated authtoken is created when sending LINK. This also allows, in theory, using a p2p network like tor, to learn about links on other networks, like telehash. This commit was sponsored by Bruno BEAUFILS on Patreon.
| * p2p: --link no longer takes a remote name, instead the --name option can be ↵Gravatar Joey Hess2016-12-16
| | | | | | | | used.
| * 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.
| * metadata --batch: Fix bug when conflicting metadata changes were made in the ↵Gravatar Joey Hess2016-12-13
| | | | | | | | | | | | | | | | same batch run. 1 microsecond delay is ugly.. but, maintaining an queue of a list of timestamps and taking a new one from the queue each time around, or maintaining a timestamp counter, would probably be slower.
| * make tor hidden service work when directory watching is not availableGravatar Joey Hess2016-12-09
| | | | | | | | Avoid crashing when built w/o inotify..
| * cleanupGravatar Joey Hess2016-12-09
| |
| * refactor ref change watchingGravatar Joey Hess2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added to change notification to P2P protocol. Switched to a TBChan so that a single long-running thread can be started, and serve perhaps intermittent requests for change notifications, without buffering all changes in memory. The P2P runner currently starts up a new thread each times it waits for a change, but that should allow later reusing a thread. Although each connection from a peer will still need a new watcher thread to run. The dependency on stm-chans is more or less free; some stuff in yesod uses it, so it was already indirectly pulled in when building with the webapp. This commit was sponsored by Francois Marier on Patreon.
| * git-annex-shell, remotedaemon, git remote: Fix some memory DOS attacks.Gravatar Joey Hess2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attacker could just send a very lot of data, with no \n and it would all be buffered in memory until the kernel killed git-annex or perhaps OOM killed some other more valuable process. This is a low impact security hole, only affecting communication between local git-annex and git-annex-shell on the remote system. (With either able to be the attacker). Only those with the right ssh key can do it. And, there are probably lots of ways to construct git repositories that make git use a lot of memory in various ways, which would have similar impact as this attack. The fix in P2P/IO.hs would have been higher impact, if it had made it to a released version, since it would have allowed DOSing the tor hidden service without needing to authenticate. (The LockContent and NotifyChanges instances may not be really exploitable; since the line is read and ignored, it probably gets read lazily and does not end up staying buffered in memory.)
| * didn't mean to commit this change yetGravatar Joey Hess2016-12-08
| |
| * commentGravatar Joey Hess2016-12-08
| |
| * 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.
| * include error message when unable to connect to peerGravatar Joey Hess2016-12-08
| |
| * Merge branch 'master' into torGravatar Joey Hess2016-12-07
| |\
| * | remote uuid discovery in p2p --linkGravatar Joey Hess2016-12-07
| | | | | | | | | | | | | | | | | | This also tests that we can connect to the peer. This commit was sponsored by Jeff Goeke-Smith on Patreon.
| | * add: Stage modified non-large files when running in indirect mode.Gravatar Joey Hess2016-12-05
| | | | | | | | | | | | (This was already done in v6 mode and direct mode.)