summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavid2020-05-16 23:44:41 +0000
committeradmin2020-05-16 23:44:41 +0000
commit382491a072de1631e5f50c1b984bcb0834efa1a5 (patch)
tree688b6e361db6925b245c664519d47a16070da860
parent8bc8e2d2040227af6a180466ac85bc772fb96131 (diff)
Added a comment: first attempt
-rw-r--r--doc/todo/Support_for_mirroring_bare_git_repos/comment_1_f8d0ade5f31f85c1db50b3ec6a9a3818._comment19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/todo/Support_for_mirroring_bare_git_repos/comment_1_f8d0ade5f31f85c1db50b3ec6a9a3818._comment b/doc/todo/Support_for_mirroring_bare_git_repos/comment_1_f8d0ade5f31f85c1db50b3ec6a9a3818._comment
new file mode 100644
index 00000000..fb6ff177
--- /dev/null
+++ b/doc/todo/Support_for_mirroring_bare_git_repos/comment_1_f8d0ade5f31f85c1db50b3ec6a9a3818._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="david"
+ avatar="http://cdn.libravatar.org/avatar/22c2d800db6a7699139df604a67cb221"
+ subject="first attempt"
+ date="2020-05-16T23:44:41Z"
+ content="""
+This isn't very general, but it seems to work
+
+[[!format haskell \"\"\"
+bareMirror :: String -> String -> Property DebianLike
+bareMirror dir url = propertyList (\"bare mirror of \" ++ url ++ \" in \" ++ dir ) $ props
+ & Git.installed
+ & Git.bareRepo dir (User \"root\") Git.SharedAll
+ & Git.repoConfigured dir (\"remote.origin.url\", url)
+ & Git.repoConfigured dir (\"remote.origin.mirror\", \"true\")
+ & Git.repoConfigured dir (\"remote.origin.fetch\", \"+refs/*:refs/*\")
+ & Cmd.cmdProperty \"git\" [\"-C\", dir, \"fetch\", \"origin\" ] `changesFileContent` (dir </> \"HEAD\")
+\"\"\"]]
+"""]]