mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 16:48:16 -06:00
Set depth & quiet parameters only if using a remote URL
This commit is contained in:
parent
929ddf9b4e
commit
017bcbbeba
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user