Code

Make clone behave like git clone by default again.
authorSimon Hausmann <simon@lst.de>
Thu, 7 Jun 2007 19:12:25 +0000 (21:12 +0200)
committerSimon Hausmann <simon@lst.de>
Thu, 7 Jun 2007 19:52:12 +0000 (21:52 +0200)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4

index 965b391cda870ecd7d174adb00151ccbbcdf36d4..3fe7ae77a889c4b60a9687a02e6bd0016f256318 100755 (executable)
@@ -1364,6 +1364,11 @@ class P4Clone(P4Sync):
             sys.exit(1)
 
         depotPaths = args
+
+        if not self.cloneDestination and len(depotPaths) > 1:
+            self.cloneDestination = depotPaths[-1]
+            depotPaths = depotPaths[:-1]
+
         for p in depotPaths:
             if not p.startswith("//"):
                 return False