generated from coulomb/repo-seed
Repo stats and features as aggregates
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user