| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 26fc586 commit a9a5414
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -256,7 +256,7 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False): | |||
| 256 | 256 | # END assure url correctness | |
| 257 | 257 | ||
| 258 | 258 | # INSTANTIATE INTERMEDIATE SM | |
| 259 | - sm = cls(repo, cls.NULL_BIN_SHA, cls.k_default_mode, path, name) | ||
| 259 | + sm = cls(repo, cls.NULL_BIN_SHA, cls.k_default_mode, path, name, url='invalid-temporary') | ||
| 260 | 260 | if sm.exists(): | |
| 261 | 261 | # reretrieve submodule from tree | |
| 262 | 262 | try: | |
@@ -298,7 +298,7 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False): | |||
| 298 | 298 | if not branch_is_default: | |
| 299 | 299 | kwargs['b'] = br.name | |
| 300 | 300 | # END setup checkout-branch | |
| 301 | - mrepo = git.Repo.clone_from(url, path, **kwargs) | ||
| 301 | + mrepo = git.Repo.clone_from(url, os.path.join(repo.working_tree_dir, path), **kwargs) | ||
| 302 | 302 | # END verify url | |
| 303 | 303 | ||
| 304 | 304 | # update configuration and index | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -610,6 +610,7 @@ def test_add_empty_repo(self, rwdir): | |||
| 610 | 610 | git.Repo.init(empty_repo_dir) | |
| 611 | 611 | ||
| 612 | 612 | for checkout_mode in range(2): | |
| 613 | - self.failUnlessRaises(ValueError, parent.create_submodule, 'empty', 'empty', | ||
| 614 | - url=empty_repo_dir, no_checkout=checkout_mode) | ||
| 613 | + name = 'empty' + str(checkout_mode) | ||
| 614 | + self.failUnlessRaises(ValueError, parent.create_submodule, name, name, | ||
| 615 | + url=empty_repo_dir, no_checkout=checkout_mode and True or False) | ||
| 615 | 616 | # end for each checkout mode | |
| Back | FazBrowse Home | New Git URL |
0 commit comments