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

Pass starting point as initial prompt text when creating new branches #1809

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

kaste
Copy link
Collaborator

@kaste kaste commented Nov 19, 2023

Unlike with remote branches, local branches that were the target of the [b] shortcut, were failing to pass the branch name as the initial text of the prompt for the new branch.

This commit was already in #1797 which got reverted in #1800 because it threw. Since then we taught base_commands.WithInputHandlers to include arguments with their default values if the command was not called with them, essentially fixing the underlying issue.

Still, Pavel's patch needed an or = "" because the default start_point is None which is not an allowed initial text for an input handler. Added that.

Unlike with remote branches, local branches that were the target of the
`[b]` shortcut, were failing to pass the branch name as the initial
text of the prompt for the new branch.

This commit was already in #1797 which got reverted in #1800 because
it threw.  Since then we taught `base_commands.WithInputHandlers` to
include arguments with their default values if the command was not
called with them, essentially fixing the underlying issue.

Still, Pavel's patch needed an `or = ""` because the default
`start_point` is `None` which is not an allowed initial text for an
input handler.  Added that.

Signed-off-by: herr kaste <[email protected]>
@kaste kaste enabled auto-merge November 19, 2023 17:32
@kaste kaste merged commit d97f0fc into master Nov 19, 2023
8 checks passed
@kaste kaste deleted the reapply-pavels-patch branch November 19, 2023 17:33
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.

2 participants