From a9a5414300a245b6e93ea4f39fbca792c3ec753f Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 15 Jan 2015 19:16:08 +0100 Subject: Fixed previously failing test It actually revealed a bug in the implementation of Submodule.add, which just showed in python 3 for the wrong reasons. Thankfully, failing tests after all allowed to get this issue fixed ... . --- git/objects/submodule/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git/objects/submodule/base.py') diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 92b0c8e8..e055cb8c 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -256,7 +256,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): # END assure url correctness # INSTANTIATE INTERMEDIATE SM - sm = cls(repo, cls.NULL_BIN_SHA, cls.k_default_mode, path, name) + sm = cls(repo, cls.NULL_BIN_SHA, cls.k_default_mode, path, name, url='invalid-temporary') if sm.exists(): # reretrieve submodule from tree try: @@ -298,7 +298,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): if not branch_is_default: kwargs['b'] = br.name # END setup checkout-branch - mrepo = git.Repo.clone_from(url, path, **kwargs) + mrepo = git.Repo.clone_from(url, os.path.join(repo.working_tree_dir, path), **kwargs) # END verify url # update configuration and index -- cgit v1.2.1