fix: unstaged git diff

This commit is contained in:
Carl-Robert Linnupuu 2024-12-01 00:43:44 +00:00
parent 4e5b28048b
commit 54e5e8331c
2 changed files with 1 additions and 2 deletions

View file

@ -31,7 +31,7 @@ object InfillRequestUtil {
val project = request.editor.project ?: return infillRequestBuilder.build()
val repository = GitUtil.getProjectRepository(project)
if (repository != null) {
if (repository != null && service<ConfigurationSettings>().state.codeCompletionSettings.gitDiffEnabled) {
try {
val unstagedDiff = GitUtil.getUnstagedDiff(project, repository)
if (unstagedDiff.isNotEmpty()) {

View file

@ -26,7 +26,6 @@ object GitUtil {
): List<GitDiffDetails> {
val handler = GitLineHandler(project, gitRepository.root, GitCommand.DIFF)
handler.addParameters(
"--cached",
"--unified=1",
"--diff-filter=AM",
"--no-prefix",