Skip to content

Commit cb160c6

Browse files
committed
Log the output of the diff commit if LOG_LEVEL is high enough
1 parent b112868 commit cb160c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aicodebot/coder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ def git_diff_context(commit=None):
117117
if commit:
118118
# If a commit is provided, just get the diff for that commit
119119
logger.debug(f"Getting diff for commit {commit}")
120-
return exec_and_get_output(["git", "show", commit])
120+
show = exec_and_get_output(["git", "show", commit])
121+
logger.debug(f"Diff for commit {commit}: {show}")
122+
return show
121123
else:
122124
# Otherwise, get the diff for the staged files, or if there are none, the diff for the unstaged files
123125
staged_files = exec_and_get_output(["git", "diff", "--cached", "--name-only"]).splitlines()

0 commit comments

Comments
 (0)