Merge pull request !2737 from rhodecode-enterprise-ce RCCE-194-partial-clone
feat(git): added necesary git config options to enable partial and shallow cloning via ssh by default
This commit is contained in:
commit
a8ec20b857
1 changed files with 5 additions and 1 deletions
|
|
@ -39,7 +39,11 @@ class GitTunnelWrapper(object):
|
|||
|
||||
def command(self):
|
||||
root = self.server.get_root_store()
|
||||
git_server_config = " "
|
||||
# Support for partial and shallow cloning
|
||||
if self.server.repo_mode == "upload-pack":
|
||||
git_server_config = " -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true "
|
||||
else:
|
||||
git_server_config = " "
|
||||
command = f"cd {root}; {self.server.git_path}{git_server_config}{self.server.repo_mode} '{root}{self.server.repo_name}'"
|
||||
log.debug("Final CMD: %s", command)
|
||||
return command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue