summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-templates/description0
-rw-r--r--git-templates/git-daemon-export-ok0
-rw-r--r--lorrycontroller/local.py7
-rw-r--r--setup.py3
4 files changed, 8 insertions, 2 deletions
diff --git a/git-templates/description b/git-templates/description
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/git-templates/description
diff --git a/git-templates/git-daemon-export-ok b/git-templates/git-daemon-export-ok
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/git-templates/git-daemon-export-ok
diff --git a/lorrycontroller/local.py b/lorrycontroller/local.py
index d55214d..aee87b8 100644
--- a/lorrycontroller/local.py
+++ b/lorrycontroller/local.py
@@ -16,6 +16,7 @@
import logging
import os
import os.path
+import sys
import cliapp
@@ -45,7 +46,11 @@ class LocalDownstream(hosts.DownstreamHost):
# These are idempotent, so we don't need to explicitly check
# whether the repository already exists
os.makedirs(repo_path, exist_ok=True)
- cliapp.runcmd(['git', 'init', '--bare', repo_path])
+ cliapp.runcmd(
+ ['git', 'init', '--bare',
+ '--template',
+ os.path.join(sys.prefix, 'share/lorry-controller/git-templates'),
+ repo_path])
if 'head' in metadata:
cliapp.runcmd(['git', '--git-dir', repo_path,
diff --git a/setup.py b/setup.py
index a7de1e8..9dc2463 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2012-2019 Codethink Limited
+# Copyright (C) 2012-2020 Codethink Limited
from distutils.core import setup
@@ -16,6 +16,7 @@ setup(name='lorry-controller',
'lorry-controller-remove-old-jobs'],
packages=['lorrycontroller', 'lorrycontroller.migrations'],
data_files=[
+ ('share/lorry-controller/git-templates', glob.glob('git-templates/*')),
('share/lorry-controller/templates', glob.glob('templates/*')),
('share/lorry-controller/static', glob.glob('static/*')),
],