[Bug-fix] Fix error caused by executing Repo.clone_from twice (#1015)

Co-authored-by: xuxiang <xuxiang@aliyun.com>
This commit is contained in:
xuxiang
2023-12-16 11:03:07 +08:00
committed by GitHub
parent 54f43215cd
commit e719b5bac3

View File

@@ -85,7 +85,6 @@ class GithubLoader(BaseLoader):
logging.info("Fetch completed.")
else:
logging.info("Cloning repository...")
Repo.clone_from(repo_url, local_path)
repo = Repo.clone_from(repo_url, local_path)
logging.info("Clone completed.")
return repo.head.commit.tree