Git doesn't create the destination directory structure for you in
authorKalle Vahlman <zuh@iki.fi>
Mon, 23 Jun 2008 18:54:17 +0000 (21:54 +0300)
committerKalle Vahlman <zuh@iki.fi>
Mon, 23 Jun 2008 18:54:17 +0000 (21:54 +0300)
version 1.5.6, probably due to the clone command being rewritten in C.

If it's a bug this commit can be reverted, but since creating the
destination structure before cloning doesn't really break anything
I'm not sure if it's worth it.

matrix/repositories.py

index 007c1ad..c2fa48d 100644 (file)
@@ -97,6 +97,7 @@ class Repository(object):
                if os.path.exists(self.path):
                        self.__clone_in_place(url)
                else:
+                       os.makedirs(os.path.split(self.path)[0])
                        git.clone(self.path, url, checkout=False)
 
                if self.exclude: