Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
Fix merge errors in git_handler.py (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
waydegilliam authored Nov 21, 2023
1 parent 5661c91 commit aa45346
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions mentat/git_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
from mentat.session_context import SESSION_CONTEXT


def get_git_diff_for_path(path: Path) -> str:
session_context = SESSION_CONTEXT.get()
git_root = session_context.git_root
return subprocess.check_output(
["git", "diff", path], cwd=git_root, text=True, stderr=subprocess.DEVNULL
)


def get_non_gitignored_files(path: Path) -> set[Path]:
return set(
# git returns / separated paths even on windows, convert so we can remove
Expand Down Expand Up @@ -181,9 +173,6 @@ def check_head_exists() -> bool:
git_root = session_context.git_root

try:
subprocess.check_output(
["git", "rev-parse", "HEAD", "--"], cwd=git_root, stderr=subprocess.DEVNULL
)
subprocess.check_output(
["git", "rev-parse", "HEAD", "--"], cwd=git_root, stderr=subprocess.DEVNULL
)
Expand Down

0 comments on commit aa45346

Please sign in to comment.