gpush: try to determine a source branch more aggressively, part 2


originally, the only purpose of determining the source branch was
deriving the target branch from it, so it made sense to consider only
branches with upstreams. however, since commit 6cc199457, and even more
since commit 535da8885f, we try to "overshoot" the specified tip, for
which it makes sense to determine the branch even if it has no upstream.
also, since commit 7d020859f, and even more since commit 03c8458dd, the
local branch matters for state tracking.

Change-Id: Iec9dddddef4b9577516392c36c2d454fcb4a23a6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commit006b90b5ef3b43e19d82ea2a757af6859de6f180
parent3054ec0cb9193f6f86aeb112f8349acd8d0ae46a
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>
commit timeTue, 9 Jan 2024 16:38:26 +0000