Skip to content

Commit 4a4fd67

Browse files
committed
shallow clone to speed up
1 parent 9c2e10c commit 4a4fd67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/get_knowledge_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def clone_repository(repo_url, local_dir):
1919
""" Clone or pull the repository based on its existence. """
2020
if not os.path.exists(local_dir):
2121
print(f"Cloning repository into {local_dir}")
22-
Repo.clone_from(repo_url, local_dir)
22+
Repo.clone_from(repo_url, local_dir, depth=1)
2323
else:
2424
print(f"Repository already exists at {local_dir}. Pulling latest changes...")
2525
repo = Repo(local_dir)
@@ -137,7 +137,7 @@ def parse_markdown_file_to_json(file_path):
137137
for section in sections:
138138
about = ", ".join(section["about"])
139139
text = " ".join(line for line in section["text"] if line)
140-
140+
141141
if about and text: # Only insert if both 'about' and 'text' are not empty
142142
json_output.append({
143143
"id": current_id,

0 commit comments

Comments
 (0)