# HG changeset patch # User Marcin Kuzminski # Date 2017-04-18 14:16:17 # Node ID 0ed081fc96e0f83b9dd83e2debb8549eb4d7a7b9 # Parent 333281c96c3c869f2f434a72fcdeef4078d790d0 git: handle properly the .git bare repo clones. diff --git a/vcsserver/pygrack.py b/vcsserver/pygrack.py --- a/vcsserver/pygrack.py +++ b/vcsserver/pygrack.py @@ -95,7 +95,13 @@ class GitRepository(object): :param path: """ - return path.split(self.repo_name, 1)[-1].strip('/') + path = path.split(self.repo_name, 1)[-1] + if path.startswith('.git'): + # for bare repos we still get the .git prefix inside, we skip it + # here, and remove from the service command + path = path[4:] + + return path.strip('/') def inforefs(self, request, unused_environ): """