mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
git-serve.py: Automatically create repositories
Create a fresh Git repository when cloning or pushing using a path that does not yet exist. Implements FS#43308. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
e8c48e9f4c
commit
02dd9c518f
1 changed files with 2 additions and 0 deletions
|
@ -119,6 +119,8 @@ if action == 'git-upload-pack' or action == 'git-receive-pack':
|
||||||
if not repo_path_validate(path):
|
if not repo_path_validate(path):
|
||||||
die('%s: invalid path: %s' % (action, path))
|
die('%s: invalid path: %s' % (action, path))
|
||||||
pkgbase = repo_path_get_pkgbase(path)
|
pkgbase = repo_path_get_pkgbase(path)
|
||||||
|
if not os.path.exists(path):
|
||||||
|
setup_repo(pkgbase, user)
|
||||||
if action == 'git-receive-pack':
|
if action == 'git-receive-pack':
|
||||||
if not check_permissions(pkgbase, user):
|
if not check_permissions(pkgbase, user):
|
||||||
die('%s: permission denied: %s' % (action, user))
|
die('%s: permission denied: %s' % (action, user))
|
||||||
|
|
Loading…
Add table
Reference in a new issue