Set depth & quiet parameters only if using a remote URL

This commit is contained in:
Jeremy Stretch 2024-07-10 08:58:43 -04:00
parent 929ddf9b4e
commit 017bcbbeba

View File

@ -84,9 +84,7 @@ class GitBackend(DataBackend):
clone_args = { clone_args = {
"branch": self.params.get('branch'), "branch": self.params.get('branch'),
"config": self.config, "config": self.config,
"depth": 1,
"errstream": porcelain.NoneStream(), "errstream": porcelain.NoneStream(),
"quiet": True,
} }
if self.url_scheme in ('http', 'https'): if self.url_scheme in ('http', 'https'):
@ -97,9 +95,9 @@ class GitBackend(DataBackend):
"password": self.params.get('password'), "password": self.params.get('password'),
} }
) )
elif not self.url_scheme: if self.url_scheme:
clone_args["depth"] = None clone_args["quiet"] = True
del (clone_args["quiet"]) clone_args["depth"] = 1
logger.debug(f"Cloning git repo: {self.url}") logger.debug(f"Cloning git repo: {self.url}")
try: try: