From f39fc5faa3c7a8cb23cd39b4800a9b34cce88e10 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sun, 7 Jul 2024 13:05:01 -0300 Subject: [PATCH] Implemented the `get_all_commit_hashes_since_tag` function in the `scripts/blame.py` file. --- scripts/blame.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/blame.py b/scripts/blame.py index 2a89b241f..b40b21f3f 100755 --- a/scripts/blame.py +++ b/scripts/blame.py @@ -7,7 +7,20 @@ from pathlib import Path from aider.dump import dump def get_all_commit_hashes_since_tag(tag): - pass + try: + # Get all commit hashes since the specified tag + result = subprocess.run( + ["git", "rev-list", f"{tag}..HEAD"], + capture_output=True, + text=True, + check=True + ) + # Split the output into individual commit hashes + commit_hashes = result.stdout.strip().split('\n') + return commit_hashes + except subprocess.CalledProcessError as e: + print(f"Error: {e}", file=sys.stderr) + return [] def main(): pass