summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-12-28 15:37:07 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-12-28 15:38:52 +0100
commit00e6e4a182306ceb05b95dd461513f433d4570d6 (patch)
treecbc52c07d675046661fd9dd343dae94cdeedb538 /scripts
parent332d0f61e49a5aa1a127ee692d06d10b0cba1f44 (diff)
downloadaurweb-00e6e4a182306ceb05b95dd461513f433d4570d6.tar.xz
git-serve.py: Use virtual paths
Pretend that all repositories are located in the root directory of the file system to achieve location transparency. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git-integration/git-serve.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py
index 0cad176..1dec6b4 100755
--- a/scripts/git-integration/git-serve.py
+++ b/scripts/git-integration/git-serve.py
@@ -89,7 +89,7 @@ cmdargv = shlex.split(cmd)
action = cmdargv[0]
if action == 'git-upload-pack' or action == 'git-receive-pack':
- path = cmdargv[1]
+ path = repo_base_path.rstrip('/') + cmdargv[1]
if not repo_path_validate(path):
die('invalid path: %s' % (path))
pkgbase = repo_path_get_pkgbase(path)
@@ -99,6 +99,7 @@ if action == 'git-upload-pack' or action == 'git-receive-pack':
os.environ["AUR_USER"] = user
os.environ["AUR_GIT_DIR"] = path
os.environ["AUR_PKGBASE"] = pkgbase
+ cmd = action + " '" + path + "'"
os.execl(git_shell_cmd, git_shell_cmd, '-c', cmd)
elif action == 'setup-repo':
if len(cmdargv) < 2: