Added support for importing multiple branches into refs/heads instead of just refs/remotes
using --import-local. Needs some further microfix but seems to work otherwise.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Specifying --detect-branches is now only needed for the initial clone/sync.
Afterwards it's turned on implicitly if more p4 branches than remotes/p4/master
are found.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Use git format-patch and git apply --apply when extracting patches from git and
applying them to a Perforce checkout. This should make it possible to apply git
commits with binary files that cannot be handled by path.
Removed ancient and unused code to find the last imported revision from previous imports
to use for the current import by looking at the p4 tags. The current approach of using
the log message works better.
Always pass a sha1 for the initial parent so that git-fast-import doesn't think
it's creating a new branch from itself. It's a sensible error in general but
in the case of incremental imports we have to apply force :)