summaryrefslogtreecommitdiffstats
path: root/scripts/git-integration/init-repos.py
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2015-01-08 19:28:34 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2015-01-11 18:44:01 +0100
commit4dbd562b8e5bf8d44a7a19b8e248b2b0e0295eb2 (patch)
tree54904534cca89bb06074799fdb16776534f6201d /scripts/git-integration/init-repos.py
parentcb661cd971b7a219c33e24875d23afafc6a48334 (diff)
downloadaurweb-4dbd562b8e5bf8d44a7a19b8e248b2b0e0295eb2.tar.xz
Use custom templates for Git repositories
Do not waste disk space by copying dozens of unneeded sample hooks. Use a custom template directory that only includes the git-update hook. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'scripts/git-integration/init-repos.py')
-rwxr-xr-xscripts/git-integration/init-repos.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/git-integration/init-repos.py b/scripts/git-integration/init-repos.py
index 62c51b1..5c4fcfe 100755
--- a/scripts/git-integration/init-repos.py
+++ b/scripts/git-integration/init-repos.py
@@ -19,7 +19,7 @@ aur_db_socket = config.get('database', 'socket')
repo_base_path = config.get('serve', 'repo-base')
repo_regex = config.get('serve', 'repo-regex')
-git_update_hook = config.get('serve', 'git-update-hook')
+template_path = config.get('serve', 'template-path')
def die(msg):
sys.stderr.write("%s\n" % (msg))
@@ -45,7 +45,6 @@ for repo in repos:
print("[%s/%d] %s" % (str(i).rjust(len(str(n))), n, repo))
repo_path = repo_base_path + '/' + repo + '.git/'
- pygit2.init_repository(repo_path, True)
- os.symlink(git_update_hook, repo_path + 'hooks/update')
+ pygit2.init_repository(repo_path, True, 48, template_path=template_path)
i += 1