When using ellama-generate-commit-message, I am always getting a generated commit message for the diff for the unstaged changes even though I am committing a partial commit. Since #146 I would expect only the staged changes to be in the diff.
I am not a lips hacker, but I fumbled around a bit with the debugger. It showed that the (vc-git-diff-switches "--cached") binding is not picked up by the vc-git-internal call:
When using
ellama-generate-commit-message
, I am always getting a generated commit message for the diff for the unstaged changes even though I am committing a partial commit. Since #146 I would expect only the staged changes to be in the diff.I am not a lips hacker, but I fumbled around a bit with the debugger. It showed that the
(vc-git-diff-switches "--cached")
binding is not picked up by thevc-git-internal
call:Found by running
M-x debug-on-entry
vc-switches
and stepping through withd
.I fumbled around a bit more and got it to work by moving the binding around the
with-temp-buffer
:I do not know why the
let
works and thelet*
does not.(let* ((a 2) (b 3) (c a)) (+ b c))
does eval to5
.I can whip up a PR if this solution is the way to fix it.