mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
removed commit logic
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user