From 2738a822d1e266467b1ef867b1dd11dffbb57b42 Mon Sep 17 00:00:00 2001 From: jleu3482 Date: Sun, 11 Jan 2026 18:40:39 +0800 Subject: [PATCH] Test commit with fixed git.py v2 --- git.py | 10 ++++++++++ test_fixed_git.txt | Bin 0 -> 62 bytes 2 files changed, 10 insertions(+) create mode 100644 test_fixed_git.txt diff --git a/git.py b/git.py index b5fcda47..c8956916 100644 --- a/git.py +++ b/git.py @@ -11,6 +11,16 @@ from datetime import datetime def run_command(cmd, cwd=None): """Run a shell command and return output.""" + # On Windows, if cmd starts with 'git', we need to use the full path to avoid conflict with git.py + if sys.platform == "win32" and cmd.strip().startswith("git "): + # Use full path to git.exe with proper quoting + git_exe = r'"C:\Program Files\Git\bin\git.exe"' + if os.path.exists(git_exe.strip('"')): + # Replace 'git' with the full path + parts = cmd.split(" ", 1) + if parts[0] == "git": + cmd = f'{git_exe} {parts[1]}' if len(parts) > 1 else git_exe + try: result = subprocess.run(cmd, shell=True, capture_output=True, text=True, cwd=cwd) return result.returncode, result.stdout, result.stderr diff --git a/test_fixed_git.txt b/test_fixed_git.txt new file mode 100644 index 0000000000000000000000000000000000000000..68def2c930488fc43748566ef1b33e363fb68fc8 GIT binary patch literal 62 zcmezWFN7hLp_rkBL4hHeA%h{2A&(&)D5AiS#*oiY1g0|?Du5y>Kz2GqCQzjwLjgl2 J11|#?0|3g;3{3z4 literal 0 HcmV?d00001