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(git): prevent core.fsmonitor from executing external commands #3981

Merged
merged 1 commit into from Jul 31, 2023

Conversation

davidkna
Copy link
Member

@davidkna davidkna commented May 12, 2022

Description

This PR ensures core.fsmonitor is unset unless it is set to true.

I created a exec_git wrapper in Context::Repo in order to allow controlling all instances of external git commands centrally. In that function, core.fsmonitor is unset as required.
exec_git also handles all extra flags previously shared by all external git commands (--no-optional-locks, -C). Some external git commands used -C and some used --git-dir and --work-tree to set the active repo. I've opted to use both since --work-tree isn't always available.

Motivation and Context

Partial fix for #3974
Closes? #4263
Closes #4712

Screenshots (if appropriate):

How Has This Been Tested?

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@andytom andytom merged commit 03278e4 into starship:master Jul 31, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git_status not working
2 participants