git-annex/CmdLine
Joey Hess d2576e5f1a
git-annex-shell: accept uuid of remote that proxying is enabled for
For NotifyChanges and also for the fallthrough case where
git-annex-shell passes a command off to git-shell, proxying is currently
ignored. So every remote that is accessed via a proxy will be treated as
the same git repository.

Every other command listed in cmdsMap will need to check if
Annex.proxyremote is set, and if so handle the proxying appropriately.
Probably only P2PStdio will need to support proxying. For now,
everything else refuses to work when proxying.

The part of that I don't like is that there's the possibility a command
later gets added to the list that doesn't check proxying.

When proxying is not enabled, it's important that git-annex-shell not
leak information that it would not have exposed before. Such as the
names or uuids of remotes.

I decided that, in the case where a repository used to have proxying
enabled, but no longer supports any proxies, it's ok to give the user a
clear error message indicating that proxying is not configured, rather
than a confusing uuid mismatch message.

Similarly, if a repository has proxying enabled, but not for the
requested repository, give a clear error message.

A tricky thing here is how to handle the case where there is more than
one remote, with proxying enabled, with the specified uuid. One way to
handle that would be to plumb the proxyRemoteName all the way through
from the remote git-annex to git-annex-shell, eg as a field, and use
only a remote with the same name. That would be very intrusive though.

Instead, I decided to let the proxy pick which remote it uses to access
a given Remote. And so it picks the least expensive one.
The client after all doesn't necessarily know any details about the
proxy's configuration. This does mean though, that if the least
expensive remote is not accessible, but another remote would have
worked, an access via the proxy will fail.
2024-06-10 12:44:35 -04:00
..
GitAnnex Change --copies' meta parameter to NUMBER 2024-04-30 15:16:22 -04:00
GitAnnexShell git-annex-shell: accept uuid of remote that proxying is enabled for 2024-06-10 12:44:35 -04:00
Action.hs Fix display when run with -J1 2023-06-15 10:07:54 -04:00
AnnexSetter.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Batch.hs log migration trees to git-annex branch 2023-12-06 15:40:03 -04:00
GitAnnex.hs Added updateproxy command and remote.name.annex-proxy configuration 2024-06-04 14:52:03 -04:00
GitAnnexShell.hs git-annex-shell: accept uuid of remote that proxying is enabled for 2024-06-10 12:44:35 -04:00
GitRemoteAnnex.hs git-remote-annex: Support urls like annex::https://example.com/foo-repo 2024-05-30 12:24:16 -04:00
GitRemoteTorAnnex.hs fix name of gitremote-helpers 2024-05-06 12:07:05 -04:00
Option.hs initial implementation of --explain 2023-07-25 16:52:57 -04:00
Seek.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Usage.hs add FIELD?=GLOB to git-annex view usage 2023-02-07 18:09:10 -04:00