Skip to content

Commit

Permalink
Simplify unneeded paths
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Aug 29, 2018
1 parent 5e8f22b commit a694e43
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions scc/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,13 +1060,12 @@ def register_submodules(self):
directory in self.repository_config["submodules"]:
repository_config = \
self.repository_config["submodules"][directory]
# TODO: Unclear if this is needed
with self.cd(self.path):
submodule_repo = \
self.gh.git_repo(directory,
repository_config=repository_config)
self.submodules.append(submodule_repo)
submodule_repo.register_submodules()

submodule_repo = \
self.gh.git_repo(directory,
repository_config=repository_config)
self.submodules.append(submodule_repo)
submodule_repo.register_submodules()

def cd(self, directory):
class DirectoryChanger(object):
Expand Down Expand Up @@ -1978,9 +1977,7 @@ def rpush(self, branch_name, remote, force=False):
self.dbg("Pushed %s to %s" % (branch_name, full_remote))

for submodule_repo in self.submodules:
# TODO: Unclear if needed
with self.cd(self.path):
submodule_repo.rpush(branch_name, remote, force=force)
submodule_repo.rpush(branch_name, remote, force=force)

def __del__(self):
# We need to make sure our logging wrappers are closed when this
Expand Down

0 comments on commit a694e43

Please sign in to comment.