diff --git a/giteapc/repo.py b/giteapc/repo.py index ba680c6..61a1b81 100644 --- a/giteapc/repo.py +++ b/giteapc/repo.py @@ -202,7 +202,7 @@ def fetch(*args, use_ssh=False, use_https=False, force=False, update=False): return 0 for arg in args: - s = Spec(arg) + s = arg if isinstance(arg, Spec) else Spec(arg) r = s.resolve() # If this is a local repository, just git fetch @@ -313,11 +313,12 @@ def search_dependencies(names, fetched, plan, **kwargs): r = s.resolve() if r.fullname not in fetched: - fetch(r.fullname, **kwargs) + fetch(s, **kwargs) fetched.add(r.fullname) # Re-resolve, as a local repository this time if r.remote: r = s.resolve(local_only=True) + # Schedule dependencies before r search_dependencies(r.dependencies(), fetched, plan, **kwargs) plan.append(s)