removed commit logic

This commit is contained in:
Mayur Kularni
2019-12-08 20:25:24 +05:30
parent 17d47ce153
commit 84616e8e5e
+1 -6
View File
@@ -68,9 +68,8 @@ def _external_repo(url=None, rev=None, cache_dir=None):
_git_checkout(new_path, rev)
repo = Repo(new_path)
original_repo = None
try:
# check if the URL is local and no default remote
# check if the URL is local and no default remote is present
# add default remote pointing to the original repo's cache location
if os.path.isdir(url):
rconfig = RemoteConfig(repo.config)
@@ -81,8 +80,6 @@ def _external_repo(url=None, rev=None, cache_dir=None):
default=True,
level=Config.LEVEL_LOCAL,
)
repo.scm.add([repo.config.config_file])
repo.scm.commit("add remote")
if cache_dir is not None:
cache_config = CacheConfig(repo.config)
@@ -90,8 +87,6 @@ def _external_repo(url=None, rev=None, cache_dir=None):
finally:
# Need to close/reopen repo to force config reread
repo.close()
if original_repo:
original_repo.close()
REPO_CACHE[key] = new_path
return new_path