From 02dd9c518f659b97dd0d301b975cf3887be5b7d8 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 6 Jan 2015 23:28:57 +0100 Subject: 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 --- scripts/git-integration/git-serve.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/git-integration') diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py index c81887b9..800eada4 100755 --- a/scripts/git-integration/git-serve.py +++ b/scripts/git-integration/git-serve.py @@ -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)) -- cgit v1.2.3-24-g4f1b