push: set the remote branch field when selecting a local branch
commitfab868a3c8e4a40fdc7a9fd2bcf9593ae15d8cfc
authorDavid Aguilar <davvid@gmail.com>
Thu, 14 Mar 2024 03:20:56 +0000 (13 20:20 -0700)
committerDavid Aguilar <davvid@gmail.com>
Thu, 14 Mar 2024 03:28:13 +0000 (13 20:28 -0700)
treee13cb5109a829971c4fd167abe69be1e57093099
parent7364be2e76a779163b45f3627e72ff97f9f23601
push: set the remote branch field when selecting a local branch

Keep the behavior of the "Push" dialog closer to the original behavior
where selecting the local branch would implicitly push that remote
branch to the same-named remote branch.

We now clear selections from the remote branch list when a local branch
is clicked. But, we also pre-populate the "Remote Branch" field so that
it's clear that the selected branch will be pushed to the remote.

We can still push a disjoint set of branches by explicitly selecting
a remote branch, but that is more of an uncommon operation.

Closes: #729
Suggested-by: @pkzc on github.com
Signed-off-by: David Aguilar <davvid@gmail.com>
cola/widgets/remote.py