Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fixed crash that would occur in git directories on WSL drives #12307

Merged
merged 1 commit into from
May 8, 2023

Conversation

ferrariofilippo
Copy link
Contributor

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Closes Bug: Crash due to git directory on WSL drive #12292

IMPORTANT
At the moment this PR only prevents the crash (branch name is still not displayed). The exception is raised because the repository belongs to a different user. We can't show the branch name/interact with the repository unless the user set it as "safe".
I think we should show a modal to warn the user about this. We might also provide the command to resolve the issue (git config --global --add safe.directory = path) or show a button to execute that

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?
    1. Open a git repository in WSL

@yaira2 yaira2 changed the title Fix: Crash due to git directory on WSL drive Fix: Fixed crash that would occur in git directories on WSL drives May 8, 2023
@yaira2
Copy link
Member

yaira2 commented May 8, 2023

I think we should show a modal to warn the user about this. We might also provide the command to resolve the issue (git config --global --add safe.directory = path) or show a button to execute that

It would be less intrusive if we display a message on the status bar but either way would work.

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 merged commit c3743bf into files-community:main May 8, 2023
@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label May 8, 2023
@ferrariofilippo ferrariofilippo deleted the Git_WSL branch July 17, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Crash due to git directory on WSL drive
2 participants