add GETINFO to external protocol (for ronnypfa)
External special remotes can now add info to `git annex info $remote`, by replying to the GETINFO message. Had to generalize some helpers to allow consuming multiple messages from the remote. The code added to Remote/* here is AGPL licensed, thus changed the license of the files. This commit was sponsored by Jake Vosloo on Patreon.
This commit is contained in:
parent
8397151b2b
commit
c3c28f7617
6 changed files with 149 additions and 67 deletions
9
doc/special_remotes/external/example.sh
vendored
9
doc/special_remotes/external/example.sh
vendored
|
@ -285,6 +285,15 @@ while read line; do
|
|||
fi
|
||||
;;
|
||||
|
||||
# This is optional, only provided as an example.
|
||||
GETINFO)
|
||||
echo INFOFIELD "repository location"
|
||||
echo INFOVALUE "$mydirectory"
|
||||
echo INFOFIELD "login"
|
||||
echo INFOVALUE "$MYLOGIN"
|
||||
echo INFOEND
|
||||
;;
|
||||
|
||||
*)
|
||||
echo UNSUPPORTED-REQUEST
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue