Commit Diff


commit - 071f7ad8fc03d5733d12761bc28dc049a4b31acf
commit + e0d5257d2863239a949733131b9713e9c0811cc5
blob - 1e2fed60eaaf2fe412397e99f86fa1461940805a
blob + 215cf1a5a5626e32a3cd09dd47cee5e8c78c8b38
--- notes-pull-push
+++ notes-pull-push
@@ -69,15 +69,35 @@ got commit
 
 repo/gotconfig syntax ideas:
 
+[[[
 # remote private mirrors
-remote "openbsd_src" repository "src" server ssh://got.openbsd.org user stsp
-remote "my_src_mirror" repository "src" server ssh://got.stsp.name user stsp
+remote "openbsd_src" {
+  repository "src"
+  server got.openbsd.org
+  protocol ssh
+  user stsp
+}
+remote "my_src_mirror" {
+  repository "src"
+  server got.stsp.name
+  protocol ssh
+  user stsp
+}
 
 # remote public mirrors
-remote "public_src_mirror_anonssh" repository "src" server ssh://got.stsp.name \
-    user anonymous
+remote "public_src_mirror_anonssh" {
+  repository "src"
+  server got.stsp.name
+  protocol ssh
+  user anonymous
+}
+
 # no authentication credentials for this remote since https is read-only
-remote "public_src_mirror" repository "src" server https://got.stsp.name
+remote "public_src_mirror" {
+  repository "src"
+  server got.stsp.name
+  protocol https
+}
 
 # read from local mirror and push to main server
 # "sync-to" enables push by default with 'got commit'
@@ -94,8 +114,16 @@ branch master pull-from public_src_mirror_anonssh
 
 # read-only access over https
 branch master pull-from public_src_mirror
+]]]
 
-# we can also use git terminology when naming remotes, of course:
-remote "origin" repository "src" server https://got.openbsd.example.com
-branch master pull-from origin
-# implied mapping: refs/heads/master <-> refs/remotes/origin/master
+read-only config for just keeping /usr/src up-to-date with 'got update':
+
+[[[
+remote "origin" {
+   repository "src"
+   server got.openbsd.mirror.example.com
+   protocol https
+}
+# mapping: refs/heads/master <-> refs/heads/master
+branch "master" pull-from "origin" local-reference "refs/heads/master"
+]]]