From 82e91b380a35c42a65111c47ecc62d5293c046e1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 19 Oct 2024 17:12:23 -0400 Subject: [PATCH] add GITMANIFEST to parseKeyVariety git-remote-annex: Fix bug that prevented using it with external special remotes, leading to protocol error messages involving "GITMANIFEST". --- CHANGELOG | 2 ++ Types/Key.hs | 1 + doc/bugs/git_remote_annex_-_rclone.mdwn | 2 ++ ..._d2c9d5ef6972465345213b949363825d._comment | 24 +++++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 doc/bugs/git_remote_annex_-_rclone/comment_1_d2c9d5ef6972465345213b949363825d._comment diff --git a/CHANGELOG b/CHANGELOG index 7303170937..7bcb3560a4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ git-annex (10.20240928) UNRELEASED; urgency=medium can be combined with --authenv. * Allow enabling the servant build flag with older versions of stm, allowing building with ghc 9.0.2. + * git-remote-annex: Fix bug that prevented using it with external special + remotes, leading to protocol error messages involving "GITMANIFEST". -- Joey Hess Thu, 17 Oct 2024 11:02:17 -0400 diff --git a/Types/Key.hs b/Types/Key.hs index 4e357b1eb6..7302605c8a 100644 --- a/Types/Key.hs +++ b/Types/Key.hs @@ -354,6 +354,7 @@ parseKeyVariety "WORM" = WORMKey parseKeyVariety "URL" = URLKey parseKeyVariety "VURL" = VURLKey parseKeyVariety "GITBUNDLE" = GitBundleKey +parseKeyVariety "GITMANIFEST" = GitManifestKey parseKeyVariety b | "X" `S.isPrefixOf` b = let b' = S.tail b diff --git a/doc/bugs/git_remote_annex_-_rclone.mdwn b/doc/bugs/git_remote_annex_-_rclone.mdwn index d879d31137..08413d95af 100644 --- a/doc/bugs/git_remote_annex_-_rclone.mdwn +++ b/doc/bugs/git_remote_annex_-_rclone.mdwn @@ -46,3 +46,5 @@ I'm slowly integrating it into everything I do because it's so cool. Right now, - git-remote-annex - Seems incredibly promising despite issues I've had getting it to install (see below) let alone work quite yet Also, if anyone is having issue using git-remote-annex, like I did running on OSX installed via homebrew, the solution is to add a symlink manually from (e.g.) `$(realpath /opt/homebrew/bin/git-annex[-shell]) <- /opt/homebrew/bin/git-remote-annex`. In other words, the current homebrew recipe simply doesn't symlink the git-annex command to git-remote-annex on your path, which git annex automagically act like a git remote helper if called like this so luckily it's an easy fix. + +> [[fixed|done]] I *think*, please comment if not --[[Joey]] diff --git a/doc/bugs/git_remote_annex_-_rclone/comment_1_d2c9d5ef6972465345213b949363825d._comment b/doc/bugs/git_remote_annex_-_rclone/comment_1_d2c9d5ef6972465345213b949363825d._comment new file mode 100644 index 0000000000..cea2815904 --- /dev/null +++ b/doc/bugs/git_remote_annex_-_rclone/comment_1_d2c9d5ef6972465345213b949363825d._comment @@ -0,0 +1,24 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2024-10-19T20:48:11Z" + content=""" +I got this protocol level dump: + + [2024-10-19 16:59:54.229607011] (Annex.ExternalAddonProcess) /home/joey/bin/rclone[1] <-- CHECKPRESENT GITMANIFEST--1eb4e389-9aea-4968-a947-498fd52645e0 + [2024-10-19 16:59:54.230079229] (Annex.ExternalAddonProcess) /home/joey/bin/rclone[1] --> CHECKPRESENT-FAILURE GITMANIFEST--1eb4e389-9aea-4968-a947-498fd52645e0 + +That protocol looks fine, problem is parseKeyVariety does not have a parser for the +GITMANIFEST key type. Once I added that, it got to a different failure that +looked due to my lack of setup of rclone, presumably it would work with a +properly setup rclone. + +I think this probably affects using any special remote with git-remote-annex. +This is still a fairly new and not much used feature, and I may not have tested +it with external special remotes when developing it. + +Re your questions, git-remote-annex doesn't care about the details of how +the special remote is configured, it's up to you to provide an url that +provides all necessary configuration options for the special remote, +whatever those are. Spaces in a path should work if properly url-encoded. +"""]]