From c9cce45a7251e8d3080169d45e3011d3d8c8485a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Dec 2013 10:30:28 -0400 Subject: use messages for query responses to allow communicating error --- doc/design/external_special_remote_protocol.mdwn | 13 ++++++++----- 1 file 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 """ -- cgit v1.2.3