perforce: force update the master branch after fetch
Created by: unknwon
Following previous unsuccessfully attempt in https://github.com/sourcegraph/sourcegraph/pull/19690, which used git p4 sync --branch refs/heads/master
. However, every run of the command would create/import duplicated commits.
In this PR, a new attempt is to force update master
to point to refs/remotes/p4/master
(which git p4 sync
imports changes by default) after every git p4 sync
, where the former is guaranteed to be not ahead of the latter in our use case.