Skip to content

Add some basic git command argument prediction #21

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

Merged
merged 3 commits into from
Apr 7, 2023

Conversation

daxian-dbw
Copy link
Member

PR Summary

Add argument prediction for some basic git command: git merge, git branch -D, git checkout, git checkout -b, git push.

I use those commands frequently in my daily work, targeting different branches and remotes, from different repos. The history predictions in this case can be very misleading and sometimes annoying, because the branch/remote names in the history prediction are often incorrect.

I have been wanting to enhance the CompletonPredictor to handle those git scenarios, and this is the first step towards that.
It's impossible to run git to get the branch/remote data for a predictor due to the timeout restriction, so I choose to access the files/folders under .git directly to get the branch/remote information about a repo.

@daxian-dbw daxian-dbw merged commit dbd89af into PowerShell:main Apr 7, 2023
@daxian-dbw daxian-dbw deleted the git branch April 7, 2023 23:40
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.

1 participant