Skip to content

Allow user to initiate open pull request prior to push completing #4339

Open
@ChrisMcD1

Description

@ChrisMcD1

Is your feature request related to a problem? Please describe.

I often find myself pushing a branch and then immediately making a PR. I hit P and then o, but then receive the warning that there is no upstream branch. This is factually correct, but one will exist in less than one second.

Describe the solution you'd like
I would like for lazygit to realize that there is a branch currently being pushed, and to wait for that to resolve prior to actually attempting to open the PR.

For my simple case, this could probably just be solved with a simple mutex or RWLock that the sync_controller sets, and the branch_controller waits to be available right when a user attempts to open a pull request. A more complicated system could be created that tracks which branches are currently being pushed, but that feels unnecessary. I don't feel like many people are pushing branch A, and then going and opening a pull request on branch B while that happens.

EDIT: ^ Actually, I think a map of locks keyed on local branch name would make a lot more sense. With stacked branches, I often actually push multiple branches at once, and then would like to be able to open pull requests on them without waiting.

Describe alternatives you've considered
The only alternative I can think of that doesn't involve coding something would be to just wait for visual confirmation that the operation has finished.

Additional context
I don't experience long push times in my daily flows, either from pre-push hooks or slow upload speeds, so I'm not sure how such a feature would impact those users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions