Commit 02dd9c51 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files 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: default avatarLukas Fleischer <>
parent e8c48e9f
......@@ -119,6 +119,8 @@ if action == 'git-upload-pack' or action == 'git-receive-pack':
if not repo_path_validate(path):
die('%s: invalid path: %s' % (action, path))
pkgbase = repo_path_get_pkgbase(path)
if not os.path.exists(path):
setup_repo(pkgbase, user)
if action == 'git-receive-pack':
if not check_permissions(pkgbase, user):
die('%s: permission denied: %s' % (action, user))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment