Fix exporting of non-annexed files to external special remotes.

Actual problem is the keyName was set to "Ref \"sha\"", which led to
this follow-on failure since it contained a space.

The bad data would also get into the export database when exporting to a
non-external special remote. Looking briefly at that, I don't think the bad
data will lead to anything more than a re-upload of the file content
now that the problem has been fixed.

This commit was sponsored by Peter Hogg on Patreon.
This commit is contained in:
Joey Hess 2017-10-30 12:47:13 -04:00
parent d0d1154497
commit 68a9c867be
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 3 additions and 1 deletions

View file

@ -31,7 +31,7 @@ exportKey sha = mk <$> catKey sha
where
mk (Just k) = AnnexKey k
mk Nothing = GitKey $ Key
{ keyName = show sha
{ keyName = Git.fromRef sha
, keyVariety = SHA1Key (HasExt False)
, keySize = Nothing
, keyMtime = Nothing