From 84616e8e5ed894faef00ef16f6bff4e1e38b3f4d Mon Sep 17 00:00:00 2001 From: Mayur Kularni Date: Sun, 8 Dec 2019 20:25:24 +0530 Subject: [PATCH] removed commit logic --- dvc/external_repo.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dvc/external_repo.py b/dvc/external_repo.py index 026c5bb13..3f55f128a 100644 --- a/dvc/external_repo.py +++ b/dvc/external_repo.py @@ -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