From d5de2567962b074f08c3ad0692e423e7525c2ec1 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sun, 7 Jul 2024 13:05:21 -0300 Subject: [PATCH] Added command-line argument support to get commit hashes since a specified tag. --- scripts/blame.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/blame.py b/scripts/blame.py index b40b21f3f..84293e70d 100755 --- a/scripts/blame.py +++ b/scripts/blame.py @@ -3,6 +3,7 @@ import subprocess import sys import tempfile +import argparse from pathlib import Path from aider.dump import dump @@ -23,7 +24,17 @@ def get_all_commit_hashes_since_tag(tag): return [] def main(): - pass + parser = argparse.ArgumentParser(description="Get commit hashes since a specified tag.") + parser.add_argument("tag", help="The tag to start from") + args = parser.parse_args() + + commit_hashes = get_all_commit_hashes_since_tag(args.tag) + if commit_hashes: + print("Commit hashes since tag", args.tag) + for hash in commit_hashes: + print(hash) + else: + print("No commit hashes found or an error occurred.") if __name__ == "__main__": main()