Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commit0/harness/run_pytest_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def main(
if not found_remote_branch:
raise Exception(f"Branch {branch} does not exist locally or remotely.")
patch = generate_patch_between_commits(
local_repo, example["base_commit"], commit_id
local_repo, example["base_commit"], commit_id, example["src_dir"]
)
patch_file = Path(log_dir / "patch.diff")
patch_file.write_text(patch)
Expand Down
3 changes: 2 additions & 1 deletion commit0/harness/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def create_repo_on_github(


def generate_patch_between_commits(
repo: git.Repo, old_commit: str, new_commit: str
repo: git.Repo, old_commit: str, new_commit: str, src_dir: str
) -> str:
"""Generate a patch string by comparing two specified commits.

Expand All @@ -172,6 +172,7 @@ def generate_patch_between_commits(
repo (git.Repo): An instance of the git.Repo object representing the repository.
old_commit (str): The hash or reference to the old commit.
new_commit (str): The hash or reference to the new commit.
src_dir (str): The source directory to exclude from the patch.

Returns:
-------
Expand Down
Loading