git p4 submit always tries to re-apply every patch
We've moved to Git but still have some systems that depend on that same data being in Perforce I'm mirroring our Git repo over to Perforce as follows:
- git pull origin master
- git p4 rebase
- git p4 submit
but the problem I'm seeing is that every time I run submit after a pull from the origin it tries to re-apply every commit, even ones that were already submitted previously which results in self generated conflicts. What's interesting is that this works:
git p4 submit <--- submit some changes git p4 submit <--- no changes to submit, so it recognizes that it's up to date
but as soon as I throw in a git pull origin master (even if there is nothing new on the origin) it loses track and on the next submit it tries to re-apply EVERYTHING. For example:
git p4 submit <--- no changes to submit git pull origin master <--- no activity on the git server side so no changes applied git p4 submit <--- tries to re-apply all changes that were already submitted earlier
Is git pull origin master somehow wiping out git p4's notion of which changes have been applied and which haven't?
you are probably still pointing at the root. Check that all branches point to the right place. Use gitk --all or git branch -a.