Skip to content

Commit

Permalink
BF: Do not record adjust branch in submodule config
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Dec 15, 2019
1 parent d62dc7e commit ee50107
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions datalad/support/gitrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3839,13 +3839,17 @@ def save_(self, message=None, paths=None, _status=None, **kwargs):
if sm_props.get('type', None) == 'directory']
to_add_submodules = _prune_deeper_repos(to_add_submodules)
for cand_sm in to_add_submodules:
branch = self.get_active_branch()
adjusted_match = ADJUSTED_BRANCH_EXPR.match(
branch if branch else '')
try:
self.add_submodule(
str(cand_sm.relative_to(self.pathobj)),
url=None,
name=None,
branch=self.get_active_branch()
)
branch=adjusted_match.group('name') if adjusted_match
else branch
)
except (CommandError, InvalidGitRepositoryError) as e:
yield get_status_dict(
action='add_submodule',
Expand Down

0 comments on commit ee50107

Please sign in to comment.