mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
refactor: remove branch and commit info from git report
This commit is contained in:
parent
8e439dc31d
commit
9b7976a07e
1 changed files with 1 additions and 5 deletions
|
@ -28,11 +28,7 @@ def get_os_info():
|
||||||
def get_git_info():
|
def get_git_info():
|
||||||
try:
|
try:
|
||||||
git_version = subprocess.check_output(["git", "--version"]).decode().strip()
|
git_version = subprocess.check_output(["git", "--version"]).decode().strip()
|
||||||
branch = (
|
return f"Git version: {git_version}"
|
||||||
subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).decode().strip()
|
|
||||||
)
|
|
||||||
commit = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip()
|
|
||||||
return f"Git version: {git_version}\nBranch: {branch}\nCommit: {commit}"
|
|
||||||
except Exception:
|
except Exception:
|
||||||
return "Git information unavailable"
|
return "Git information unavailable"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue