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


so far, we stopped the iteration over `git branch --contains` when git
told us that HEAD is detached (which it would do as the first thing).
this would lead to ignoring the branch HEAD was detached from, thus
causing somewhat spurious "no upstream" notices. so don't do that
anymore.

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