Repository navigation
git checkout: suggest commits for the first argument - #424
Open
pardeep-singh wants to merge 1 commit into
Open
pardeep-singh wants to merge 1 commit into
pardeep-singh wants to merge 1 commit into
Conversation
Add the existing commits generator to checkout's first positional argument, alongside branches and tags, as reset, show and cherry-pick already do. Addresses warpdotdev/warp#691. Signed-off-by: Pardeep Singh <pardeep.shergill17@gmail.com>
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @pardeep-singh on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
Contributor
|
@pardeep-singh, your GitHub account is not connected to Warp. Connect your GitHub account. |
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the existing
commitsgenerator togit checkout's first positional argument.git checkout <TAB>now suggests commits (for detached-HEAD checkouts) alongside branches, remote branches and tags.reset,show,revert,cherry-pick,diffandlogalready usecommits. I appended it after the ref generators, matching the ordergit loguses.Addresses warpdotdev/warp#691. Once this merges, I'll open the warp PR that bumps the
warp-command-signaturesrev.Changes
json/git.json: thegeneratorNameforcheckout's first argument now ends with"commits".src/generators/git.rs: new testtest_checkout_first_argument_completes_commits. It asserts thatcheckout's first argument still uses the branch and tag generators and now also usescommits.Testing
cargo test,cargo fmt --check,cargo clippy --all-targets --all-features -- -D warningsandnpm run format:checkall pass.Possible follow-ups (not in this PR)
git switcharg 0, used bygit switch --detach <commit>, doesn't suggest commits.git restore --source <tree>has no generator.