gpick: fix --move/--copy/--hide with no local commits


_source_map_prepare() was never called when no local commits are
present, as analyze_local_branch() exits early in this case.
unfortunately, this skipped the preparation of remote ids and 'new' as
well.

fix by factoring out source_map_validate() and calling it right after
the local branch was determined.
i opted against calling it at the top of analyze_local_branch(), as it
seemed too cryptic, so instead gpick & gpush have their own calls.

Change-Id: Ib8ec9997a127b2e639532b700e0f5f67de1bcdd9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commit3317d635ff9c968cff095e9b882da2b323f9a6c6
parent5c862e8557c05b8ff6560bd47b982b7841c7fd0c
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>
commit timeFri, 21 Jan 2022 15:04:25 +0000