Repo stats and features as aggregates
This commit is contained in:
parent
c0a044fa0b
commit
2313e8675e
10 changed files with 258 additions and 24 deletions
|
|
@ -57,6 +57,16 @@ class GitIngestionService:
|
|||
)
|
||||
return Checkout(source_path=checkout_path.resolve(), was_cloned=True)
|
||||
|
||||
def cached_checkout(self, url_or_path: str) -> Checkout | None:
|
||||
local_path = self._local_path(url_or_path)
|
||||
if local_path is not None:
|
||||
return Checkout(source_path=local_path.resolve(), was_cloned=False)
|
||||
|
||||
checkout_path = self.checkout_root / self._checkout_key(url_or_path)
|
||||
if not checkout_path.exists():
|
||||
return None
|
||||
return Checkout(source_path=checkout_path.resolve(), was_cloned=True)
|
||||
|
||||
def _checkout_branch(
|
||||
self,
|
||||
checkout_path: Path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue