gpush/gpick: revamp querying value of HEAD


don't invoke git symbolic-ref on-demand, but just load it up in-process
in load_state(), which is a lot cheaper. in conjunction with the local
branch heads which we already loaded up, we can simplify quite some code
at no runtime cost.

this also fixes the corner case of _parse_local_rev_sym() returning the
tip of the wrong branch for a plain HEAD revspec when the $from revspec
refers to another branch than HEAD does.

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