]> Nutra Git (v2) - gamesguru/git-remote-gcrypt.git/commitdiff
Add extension namespace in manifest files, 'extn' lines are preserved
authorroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
committerroot <root@localhost>
Thu, 14 Feb 2013 00:00:00 +0000 (00:00 +0000)
README.rst
git-remote-gcrypt

index 4ffb519945a524f030abeb4899362209086ccb98..9841e6f3ef9fb032035c07b9827890ac4db37831 100644 (file)
@@ -102,6 +102,12 @@ Repository Format
     R7awFCUJWYdzXzrlkk7E2Acxq/Y4EfEcd62AwGGe0o0QxL+s5CwWI/NvMhb
     repo :SHA224:5a191cea8c1021a95d813c4007c14f2cc987a40880c2f669430f1916 1
 
++ Manifest fields:
+
+  + `<fieldname><space><value>`, extends until newline.
+  + `{0-9a-f}[40]`, `pack`, `repo`, `keep` (planned), `extn` (extension
+    fields, preserved but unused).
+
 
 Pieces yet to be Implemented
 ----------------------------
index 79dd1fce986f41ad39260430ad032d74571a0a78..cee730d6c02f5d7975fc091b8cbc5cef75c83277 100755 (executable)
@@ -19,6 +19,7 @@ Hashpfx=":SHA224:"
 UrlTag="G."
 Packpfx="pack $Hashpfx"
 Packkey_bytes=33
+Extension_list=
 
 # compat/utility functions
 xecho()
@@ -285,6 +286,7 @@ make_new_repo()
                fix_config=1
        }
        echo_info "Repository URL is" "gcrypt::$URL/$UrlTag$urlid_"
+       Extension_list=$(xecho "extn comment")
        isnull "$fix_config" || echo_info "(configuration for $NAME updated)"
 }
 
@@ -335,6 +337,7 @@ ensure_connected()
 
        Branchlist=$(xecho "$manifest_" | xgrep -E '^[0-9a-f]{40} ')
        Packlist=$(xecho "$manifest_" | xgrep "^$Packpfx")
+       Extension_list=$(xecho "$manifest_" | xgrep "^extn ")
        rcv_repoid=$(xecho "$manifest_" | xgrep "^repo ")
        iseq "$(repoidstr)" "$rcv_repoid" || echo_die "Repository id mismatch!"
 }
@@ -484,7 +487,8 @@ EOF
        TmpManifest_Enc="$Localdir/manifest.$$"
        trap 'rm -f "$TmpManifest_Enc"' EXIT
 
-       (xecho "$Branchlist"; xecho "$Packlist"; repoidstr) |
+       (xecho "$Branchlist"; xecho "$Packlist";
+       repoidstr; xecho "$Extension_list") |
                PRIVENCRYPT "$Recipients" > "$TmpManifest_Enc"
 
        PUT "$URL" "$Repoid" < "$TmpManifest_Enc"