mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51: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
bf97138c78
commit
f2e1de027f
@ -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,6 +95,9 @@ class GitBackend(DataBackend):
|
|||||||
"password": self.params.get('password'),
|
"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}")
|
logger.debug(f"Cloning git repo: {self.url}")
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user