jesseduffield / jesseduffield/lazygit

Allow user to initiate open pull request prior to push completing

Open
#4,339 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.