From bee2200ca2b8d28b9bb7d4f0449627914a6aecbc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 27 Dec 2013 12:37:23 -0400 Subject: implement GETCONFIG and SETCONFIG Changed protocol spec to make SETCONFIG only store it persistently when run during INITREMOTE. I see no reason to support storing it persistently at other times, and doing so would unnecessarily complicate the code. Also, letting that be done would probably result in use for storing data that doesn't really belong there, and special remote authors who don't understand how the union merging works would probably be surprised the results. --- doc/design/external_special_remote_protocol.mdwn | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn index c27b50bfe..dd89e5074 100644 --- a/doc/design/external_special_remote_protocol.mdwn +++ b/doc/design/external_special_remote_protocol.mdwn @@ -177,14 +177,17 @@ in control. creating hash directory structures to store Keys in. (git-annex replies with VALUE followed by the value.) * `SETCONFIG Setting` - Sets one of the special remote's configuration settings. These settings - are stored in the git-annex branch, so will be available if the same - special remote is used elsewhere. - (Typically only done during INITREMOTE, although it is accepted at other - times.) + Sets one of the special remote's configuration settings. + Normally this is sent during INITREMOTE, which allows these settings + to be stored in the git-annex branch, so will be available if the same + special remote is used elsewhere. (If sent after INITREMOTE, the changed + configuration will only be available while the remote is running.) * `GETCONFIG Setting` - Gets one of the special remote's configuration settings. - (git-annex replies with VALUE followed by the value.) + Gets one of the special remote's configuration settings, which can have + been passed by the user when running `git annex initremote`, or + can have been set by a previous SETCONFIG. Can be run at any time. + (git-annex replies with VALUE followed by the value. If the setting is + not set, the value will be empty.) * `SETSTATE Key Value` git-annex can store state in the git-annex branch on a per-special-remote, per-key basis. This sets that state. -- cgit v1.2.3