perforce: sync changes into local branch
Created by: unknwon
By default, new changes fetched by git p4 sync
are synced into refs/remotes/p4/master
(as a remote-tracking branch), which makes the local branch refs/heads/master
always stay at the same commit when the repository was first created using git p4 clone ...
.
In our use case, we do not take use of refs/remotes/p4/master
but want all changes to be reflected in a local branch (ie. master
), and therefore we need explicitly doing do using git p4 sync --branch=refs/heads/master
.
Found this problem while working on https://github.com/sourcegraph/sourcegraph/issues/17682