Skip to content

Git diff fails to execute for auto complete when using WSL #3454

Closed as not planned

Description

@caimaxtingle

Before submitting your bug report

Relevant environment info

- OS: Windows
- Continue version: 0.0.83
- IDE version: PHPStorm 2024.3.1
- WSL version: 2.3.26.0
- Git path in PHPStorm: \\wsl.localhost\Ubuntu\usr\bin\git

Description

When Enable tab autocomplete is checked, auto complete does not display and any change to a file pops up the error Error handling message of type getDiff: java.io.IOException: Cannot run program "git" (in directory "\\wsl$\Ubuntu\home\test-project"): CreateProcess error=2, The system cannot find the file specified because it's trying to execute Windows Git while PHPStorm is accessing a project in WSL, but not running in WSL remote development mode

Originally posted by @timbit123 in #1466 (comment) but no issue was raised

To reproduce

  1. Set up WSL, create a project in there
  2. Install git in WSL
  3. Set your Intelli IDEA IDE to use Git from WSL
  4. Open any Intelli IDEA IDE, with Continue installed and tab auto complete enabled
  5. Create a new project from a WSL location
  6. Edit a file and see the error

Log output

Error handling message of type getDiff: java.io.IOException: Cannot run program "git" (in directory "\\wsl$\Ubuntu\home\test-project"): CreateProcess error=2, The system cannot find the file specified

Activity

  1. added
    area:autocomplete
    ide:jetbrains
    kind:bug
    on Dec 19, 2024
  2. Patrick-Erichsen commented on Dec 19, 2024

    @Patrick-Erichsen
    Contributor

    cc @RomneyDa here - this might be fixed with some recent updates to pathing for WSL/SSH.

  3. caimaxtingle commented on Jan 2, 2025

    @caimaxtingle
    Author

    @Patrick-Erichsen Is there a timeline for that to be released on IntelliJ?

  4. Patrick-Erichsen commented on Jan 8, 2025

    @Patrick-Erichsen
    Contributor

    0.0.84 is available on EAP and will be released on Friday, please let me know if the issue is resolved once you install!

  5. chl19940220 commented on Feb 13, 2025

    @chl19940220

    I encountered the same issue, and the problem was resolved after disabling the Continue plugin.

  6. mcguiretomas commented on Feb 21, 2025

    @mcguiretomas

    Encountered the same issue, resolved by eliminating "diff" from "contextProviders" in the config JSON. Using continue 0.0.90

  7. Patrick-Erichsen commented on Feb 28, 2025

    @Patrick-Erichsen
    Contributor

    @rainoffrogs note that with the new Hub, you can choose exactly which context providers are included in your assistant 😁

    https://docs.continue.dev/hub/blocks/block-types#context

  8. jose-cabral commented on Mar 11, 2025

    @jose-cabral

    I have the same issue with 1.0.2. I've removed the diff context for now 🙏

  9. jose-cabral commented on Mar 12, 2025

    @jose-cabral

    @Patrick-Erichsen
    As I said in the last message, I removed the diff context and it stopped complaining.
    Today I logged in to continue.dev account to do some comparison between the local models and the "online" ones.

    It started throwing the git diff error again (which makes sense, since the new config had the diff context.

    But now I've logged out, I'm using my previous config.yaml (I've also put the previous config.json just in case), neither have the diff context but it keeps throwing the error each time I do a change to a file 😅

    Is there any cache or something I should clear to "refresh" the plugin's memory?

    EDIT:
    nevermind, I've removed the plugin and put it back one more time and it worked 🤷

    EDIT 2:
    nope, it's still happening 😭

    Image

  10. Patrick-Erichsen commented on Mar 21, 2025

    @Patrick-Erichsen
    Contributor

    Hmm, could you try copying your config.yaml, clearing your ~/.continue directory, and then pasting it back? There is no cache for context providers that I'm aware of.

    The real solution here is we should probably do a better job of checking for Git before trying to run that in autocomplete.

  11. Patrick-Erichsen commented on Apr 17, 2025

    @Patrick-Erichsen
    Contributor

    @Harriselizabeth unfortunately I'm not sure if there is a fix, adding some labels to this issue to help us prioritize.

  12. added
    priority:high
    good-first-issue
    on Apr 17, 2025
  13. added
    os:windows
    on May 7, 2025
  14. github-actions commented on Aug 6, 2025

    @github-actions
    Contributor

    This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

  15. github-actions commented on Aug 17, 2025

    @github-actions
    Contributor

    This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:autocompletegood-first-issueide:jetbrainskind:bugos:windowspriority:highstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions