summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-16 10:30:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-16 10:30:28 -0400
commitc9cce45a7251e8d3080169d45e3011d3d8c8485a (patch)
treed1f7685a016c2087c1ba196cf23a550971542d91
parent965fba28e8551ee49fd97cbde27fa606aaf5663c (diff)
use messages for query responses to allow communicating error
-rw-r--r--doc/design/external_special_remote_protocol.mdwn13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn
index 2c3fd2a4e..4d2304a89 100644
--- a/doc/design/external_special_remote_protocol.mdwn
+++ b/doc/design/external_special_remote_protocol.mdwn
@@ -38,9 +38,9 @@ The special remote can now ask git-annex for its configuration, as needed,
and check that it's valid. git-annex responds with the configuration values
GETCONFIG directory
- /media/usbdrive/repo
+ VALUE /media/usbdrive/repo
GETCONFIG automount
- true
+ VALUE true
Once the special remote is satisfied with its configuration and is
ready to go, it tells git-annex.
@@ -169,9 +169,6 @@ avoid sending additional messages. While git-annex is in quiet mode,
the special remote can send queries to it. Queries can not be sent at any
other time.
-When it sees a query, git-annex will respond a line containing
-*only* the requested data.
-
* `DIRHASH Key`
Gets a two level hash associated with a Key. Something like "abc/def".
This is always the same for any given Key, so can be used for eg,
@@ -188,6 +185,12 @@ When it sees a query, git-annex will respond a line containing
between them. If two repositories set different values in the state
for a key, the one that sets it last wins.
+When it sees a query, git-annex will respond a VALUE message.
+The rest of the line contains the requested data.
+git-annex may also respond with an ERROR message if it did not
+understand the query. In this case, it will continue processing
+further messages.
+
## Simple shell example
[[!format sh """