mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
* Fixes #16760: datasource git on local file system fails * Fixes #16760: datasource git on local file system fails * Set depth & quiet parameters only if using a remote URL --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
b3fbcb3afc
commit
0e0d6172a4
@ -84,9 +84,7 @@ class GitBackend(DataBackend):
|
||||
clone_args = {
|
||||
"branch": self.params.get('branch'),
|
||||
"config": self.config,
|
||||
"depth": 1,
|
||||
"errstream": porcelain.NoneStream(),
|
||||
"quiet": True,
|
||||
}
|
||||
|
||||
if self.url_scheme in ('http', 'https'):
|
||||
@ -97,6 +95,9 @@ class GitBackend(DataBackend):
|
||||
"password": self.params.get('password'),
|
||||
}
|
||||
)
|
||||
if self.url_scheme:
|
||||
clone_args["quiet"] = True
|
||||
clone_args["depth"] = 1
|
||||
|
||||
logger.debug(f"Cloning git repo: {self.url}")
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user