aboutsummaryrefslogtreecommitdiff
path: root/doc/design
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-08-17 16:08:35 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-08-17 16:18:34 -0400
commite50372f632de988bbe48173081ba0367d7790193 (patch)
treeefb793295959a8a82fe5b3d600dc17d795b85971 /doc/design
parent186832323027f71ebf4a2691b4ace0f182585474 (diff)
external: nice error message for keys with spaces in their name
External special remotes will refuse to operate on keys with spaces in their names. That has never worked correctly due to the design of the external special remote protocol. Display an error message suggesting migration. Not super happy with this, but it's a pragmatic solution. Better than complicating the external special remote interface and all external special remotes. Note that I only made it use SafeKey in Request, not Response. git-annex does not construct a Response, so that would not add any safety. And presumably, if git-annex avoids feeding any such keys to an external special remote, it will never have a reason to make a Response using such a key. If it did, it would result in a protocol error anyway. There's still a Serializeable instance for Key; it's used by P2P.Protocol. There, the Key is always in the final position, so it's ok if it contains spaces. Note that the protocol documentation has been fixed to say that the File may contain spaces. One way that can happen, even though the Key can't, is when using direct mode, and the work tree filename contains spaces. When sending such a file to the external special remote the worktree filename is used. This commit was sponsored by Thom May on Patreon.
Diffstat (limited to 'doc/design')
-rw-r--r--doc/design/external_special_remote_protocol.mdwn4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn
index 8cb7ed3b6..87a838bd4 100644
--- a/doc/design/external_special_remote_protocol.mdwn
+++ b/doc/design/external_special_remote_protocol.mdwn
@@ -106,8 +106,8 @@ The following requests *must* all be supported by the special remote.
* `TRANSFER STORE|RETRIEVE Key File`
Requests the transfer of a key. For STORE, the File is the file to upload;
for RETRIEVE the File is where to store the download.
- Note that the File should not influence the filename used on the remote.
- The filename will not contain any whitespace.
+ Note that the File should not influence the filename used on the remote.
+ Note that in some cases, the File may contain whitespace.
Note that it's important that, while a Key is being stored, CHECKPRESENT
not indicate it's present until all the data has been transferred.
* `CHECKPRESENT Key`