From 7aeaf10c52ba7721fdf74b42fb7dc2cb0012704c Mon Sep 17 00:00:00 2001 From: Tasha Upchurch Date: Fri, 7 Jul 2023 01:54:57 -0400 Subject: [PATCH] aider: Added a function to check the git status and print it. # Context: USER: status --- git.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/git.py b/git.py index e69de29..bd58a61 100644 --- a/git.py +++ b/git.py @@ -0,0 +1,11 @@ +import subprocess + +def check_git_status(): + try: + output = subprocess.check_output(['git', 'status']) + print(output.decode('utf-8')) + except subprocess.CalledProcessError as e: + print(f"Error: {e}") + +if __name__ == "__main__": + check_git_status()