Make --with-origin also work without origin :)
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Simon Hausmann committed
May 25, 2007 at 10:28 UTC
417a7a6fc8c3d77e3e9a3bb0e11cb2eea978e20b
1 file changed
+3
-2
contrib/fast-import/git-p4
+3
-2
@@ -846,8 +846,9 @@ class P4Sync(Command):
846
self.refPrefix = "refs/heads/"
847
848
if self.syncWithOrigin:
849
- print "Syncing with origin first as requested by calling git fetch origin"
850
- system("git fetch origin")
849
+ if gitBranchExists("origin"):
850
+ print "Syncing with origin first as requested by calling git fetch origin"
851
+ system("git fetch origin")
852
853
createP4HeadRef = False;
854