diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2015-01-06 23:28:57 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2015-01-06 23:29:35 +0100 |
commit | 02dd9c518f659b97dd0d301b975cf3887be5b7d8 (patch) | |
tree | 9fee4f236b0de05d3b7502503782bea73550291a /scripts | |
parent | e8c48e9f4c6fd033e81f54d408ca1d01f5ddb065 (diff) | |
download | aurweb-02dd9c518f659b97dd0d301b975cf3887be5b7d8.tar.xz |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/git-integration/git-serve.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py index c81887b..800eada 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)) |