diff --git a/Remote/External.hs b/Remote/External.hs index f09589b258..34810c4acf 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -230,6 +230,7 @@ handleRequest' lck external req mp responsehandler send $ CREDS (fst creds) (snd creds) handleRemoteRequest GETUUID = send $ VALUE $ fromUUID $ externalUUID external + handleRemoteRequest GETGITDIR = send . VALUE =<< fromRepo Git.localGitDir handleRemoteRequest (SETWANTED expr) = preferredContentSet (externalUUID external) expr handleRemoteRequest GETWANTED = do diff --git a/Remote/External/Types.hs b/Remote/External/Types.hs index 4c62c2f844..c7085e39ae 100644 --- a/Remote/External/Types.hs +++ b/Remote/External/Types.hs @@ -168,6 +168,7 @@ data RemoteRequest | SETCREDS Setting String String | GETCREDS Setting | GETUUID + | GETGITDIR | SETWANTED PreferredContentExpression | GETWANTED | SETSTATE Key String @@ -184,6 +185,7 @@ instance Receivable RemoteRequest where parseCommand "SETCREDS" = parse3 SETCREDS parseCommand "GETCREDS" = parse1 GETCREDS parseCommand "GETUUID" = parse0 GETUUID + parseCommand "GETGITDIR" = parse0 GETGITDIR parseCommand "SETWANTED" = parse1 SETWANTED parseCommand "GETWANTED" = parse0 GETWANTED parseCommand "SETSTATE" = parse2 SETSTATE diff --git a/debian/changelog b/debian/changelog index fc1791d198..be9e2e6953 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ git-annex (5.20140108) UNRELEASED; urgency=medium * Added tahoe special remote. + * external special remote protocol: Added GETGITDIR. -- Joey Hess Wed, 08 Jan 2014 13:13:54 -0400 diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn index 3f4cdcb735..85df316818 100644 --- a/doc/design/external_special_remote_protocol.mdwn +++ b/doc/design/external_special_remote_protocol.mdwn @@ -212,6 +212,10 @@ in control. * `GETUUID` Queries for the UUID of the special remote being used. (git-annex replies with VALUE followed by the UUID.) +* `GETGITDIR` + Queries for the path to the git directory of the repository that + is using the external special remote. + (git-annex replies with VALUE followed by the path.) * `SETWANTED PreferredContentExpression` Can be used to set the preferred content of a repository. Normally this is not configured by a special remote, but it may make sense